andrerav
andrerav

Reputation: 393

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:

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

Upvotes: 0

Views: 838

Answers (1)

Bhushan Gholave
Bhushan Gholave

Reputation: 161

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

Upvotes: 0

Related Questions