Subscription could not be found in Azure Management API Subscription could not be found in Azure Management API azure azure

Subscription could not be found in Azure Management API


According to the error log, it seems you don't set default subscription for your service principal. You could use az account set --subscription <name or id> to set it.

If it still does not work, I suggest you could use the following code.

  var azure = Azure    .Configure()    .WithLogLevel(HttpLoggingDelegatingHandler.Level.Basic)    .Authenticate(credentials)    .withSubscription("subscription id")

Note: You should give your service principal Owner role on your subscription level. See this link. But it seems you had done it, but I suggest you could check again.