-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
Attempting to Authenticate into Azure from CLI using the following command:
az login --service-principal --username "INSERT APP ID" --password "INSERT SECRET" --tenant "INSERT TENANT ID"
Receiving the following error message back:
powershell.exe : ERROR: AADSTS700016: Application with identifier 'INSERT APP ID' was not found in the directory 'Microsoft Services'. This can happen if the
application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.
Can confirm App Id, Tenant Id and Secret are correct as attempting Authentication with the equivalent PowerShell Command works as expected
Related command
az login --service-principal --username "INSERT APP ID" --password "INSERT SECRET" --tenant "INSERT TENANT ID"
Errors
powershell.exe : ERROR: AADSTS700016: Application with identifier 'INSERT APP ID' was not found in the directory 'Microsoft Services'. This can happen if the
application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.
Issue script & Debug output
powershell.exe : ERROR: AADSTS700016: Application with identifier 'INSERT APP ID' was not found in the directory 'Microsoft Services'. This can happen if the
application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.
Expected behavior
Authenticate to Azure as expected.
Environment Summary
azure-cli 2.56.0 *
core 2.56.0 *
telemetry 1.1.0
Extensions:
logicapp 0.1.2
Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\wshiell.azure\cliextensions'
Python (Windows) 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
Attempted Troubleshooting:
- Attempt to Connect using Connect-AzAccount with same values, works as expected.
- Attempt to connect with Azure Cloud Shell Bash, also fails.