ServicePrincipalAuthentication not working
I'm passing correct credentials for the Authentication but its still not working and gives error : "AADSTS700016: Application with identifier '<userName>' was not found in the directory <tenentID>". Also how can we use this in automated manner if it requires password, as our org policy requires to update password every two month. Please suggest if I can use any alternative to log in to workspace from notebook in completely automated manner. Thanks!
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 31731eb3-e539-a563-6557-bb5c4d1e5fc8
- Version Independent ID: e773574b-f028-5293-0f12-84a6a0258b13
- Content: azureml.core.authentication.ServicePrincipalAuthentication class - Azure Machine Learning Python
- Content Source: AzureML/docs-ref-autogen/azureml-core/azureml.core.authentication.ServicePrincipalAuthentication.yml
- Service: machine-learning
- GitHub Login: @j-martens
- Microsoft Alias: jmartens
Double-check you're passing in service principal Id as username, and service principal key as password.
Regarding the second question, you could set the id & key as environment variables in your automated process, and then read them using os.environ.get within the notebook.
We hope this solves your issue. If not, please reopen the issue. Thank you.