Az Login --Service-Principal Broken Auth #30456
Labels
Account
az login/account
Auto-Assign
Auto assign by bot
Auto-Resolve
Auto resolve by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Similar-Issue
Milestone
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:
The text was updated successfully, but these errors were encountered: