Open mclacore opened 1 year ago
@jiasli for awareness
I am running into the same issue - are there any temp workaround suggestions?
Running:
az ad app permission admin-consent --id
Returns: Failed to connect to MSI. Please make sure MSI is configured correctly. Get Token request returned: <Response [400]>
As explained in https://github.com/Azure/azure-cli/issues/12137#issuecomment-596567479, az ad app permission admin-consent
doesn't work in Cloud Shell.
You may use a local machine and log in with your user account to make it work.
Thank you for replying.
Does it make sense to update Microsoft documentation and note that "az ad app permission admin-consent" doesn't work in Cloud Shell?
documentation link: https://learn.microsoft.com/en-us/cli/azure/ad/app/permission?view=azure-cli-latest#az-ad-app-permission-admin-consent
Related command
az ad app permission admin-consent --id <appId>
Describe the bug Error:
To Reproduce Create a service principal and assign tenant roles:
Expected behavior Creates the service principal, assigns API permissions, and then grants consent to those permissions.
Environment Summary
Additional context I've read from other GitHub issues elsewhere that this command is being deprecated. But, I need a viable workaround ASAP because our entire company's onboarding system for Azure customers is dependent on being able to grant admin consent.