简体   繁体   中英

Azure Management API with service principal: The subscription '[…]' could not be found

I have created a subscription with Azure Germany, and now I am attempting to deploy my application topology there using the Azure Management API and a service principal.

Deployment works fine towards the "regular" Azure cloud, however when I attempt to deploy towards my subscription in Azure Germany, I get the following error message: The subscription '[...]' could not be found .

I am able to successfully acquire an authentication token using AuthenticationContext.AcquireTokenAsync() , and I am using " https://login.microsoftonline.de/[directoryId] " as authority and " https://management.core.cloudapi.de/ " as resource . Additionally, I am using "Germany Northeast" as location/region .

The error occurs as soon as I attempt to perform a typical management task, such as creating a resource group.

I have checked the following things:

  • App registration settings
  • App permissions (Windows Azure Active Directory + Windows Azure Service Management API)
  • Correctness of subscription id, app id, and app secret/key

I am at a loss at what could be wrong. What could be causing this error message?

you should point your app to correct subscription first. Try setting subscription using this link . Add Microsoft Graph permissions to your Azure AD app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM