0
は、ここに私のトークン認証Azure APIによる定期購読はどうしてですか?
var context = new AuthenticationContext(string.Format(ConfigurationManager.AppSettings["login"], ConfigurationManager.AppSettings["tenantId"]));
var credential = new ClientCredential(ConfigurationManager.AppSettings["clientId"], ConfigurationManager.AppSettings["clientSecret"]);
_token = await context.AcquireTokenAsync(ConfigurationManager.AppSettings["apiEndpoint"], credential);
あるとはい、私はそれがあるが、このための2つの異なる名前空間が存在した後、私はMicrosoft.Azure.Management.ResourceManager
名前空間の下にSubscriptionClient
の新しいインスタンスを作成していhttps://management.core.windows.net/
から今のトークンを得ました私が使っているもの
は、ここに私のインスタンス
_credentials = new TokenCredentials(_managementToken.AccessToken);
_subscriptionClient = new SubscriptionClient(_credentials);
され、最終的にここに呼び出し
await _subscriptionClient.Subscriptions.ListAsync();
されており、そこから何も返しません。
しかし、このコール
await _subscriptionClient.Tenants.ListAsync();
から、これは私のテナントIDを返します。
私はウェブアプリケーションを使用していません。
解決策はありますか? Management APIからサブスクリプションを取得する方法
おかげ
ありがとう、私のアカウントに問題があります。私の他のチームメイトのアカウントは正常に動作します。 – sercanD