I want to connect my python application to azure.
Problem statement: Get a list of apps registered with their certificate thumbprints and expiry details.
I tried a lot but can't find any APIs. Please help me.
CodePudding user response:
You will need to use Microsoft Graph API
for that.
The API operation you would want to use is List applications
. The information about the certificates associated with each application
will be available in keyCredentials
attribute in the response.
CodePudding user response:
You could use the Azure SDK for this. For Authorization check out the Identity Package.
Do you want to host your app in Azure as well? Then you should use Manged Identity. Alternatively, create a service principal for your app. This must get the read rights to the app registrations.
If you use the SDK, you only need a credential object that is created with Tenant ID, App Id and Secret (Service Principal). See here: https://docs.microsoft.com/en-us/azure/developer/python/azure-sdk-authenticate
Basically I recommend you to use the SDK instead of calling the GRAPH. The SDK takes a lot of work from you ;)