Hello @JD Margulici ,
Thank you for reaching out Microsoft Q&A.
It is not possible to create service principles with the python SDK.
Application service principal objects are created with an app registration in Azure. This can be done using either the Azure portal or Azure CLI.
An application service principal is set up for the app when the app is registered in Azure. When registering apps for local development, it's recommended to:
- Create separate app registrations for each developer working on the app. This will create separate application service principals for each developer to use during local development and avoid the need for developers to share credentials for a single application service principal.
- Create separate app registrations per app. This scopes the app's permissions to only what is needed by the app.
During local development, environment variables are set with the application service principal's identity. The Azure SDK for Python reads these environment variables and uses this information to authenticate the app to the Azure resources it needs.
For additional information you can follow: https://learn.microsoft.com/en-us/azure/developer/python/sdk/authentication/local-development-service-principal?source=recommendations&tabs=azure-cli
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.
Regards,
Goutam Pratti.