简体   繁体   English

Azure 订阅列表使用 MS Graph 返回空结果 SDK

[英]Azure subscriptions list returns empty result with MS Graph SDK

For some reason sdk doesn't return subscriptions although I have one.出于某种原因,sdk 没有返回订阅,尽管我有一个。 I have added Subscription.Read.All permission to my app registration.我已将Subscription.Read.All权限添加到我的应用程序注册中。

client := msgraphsdk.NewGraphServiceClient(adapter)
res, err := client.Subscriptions().Get(nil)

I use the same code to get Organizations and it works fine.我使用相同的代码来获取 Organizations,它工作正常。 I use oauth2 token for sdk authentication.我使用 oauth2 令牌进行 sdk 身份验证。

Ok, these subscriptions from Graph SDK are a completely different thing.好的,来自 Graph SDK 的这些订阅是完全不同的东西。 To get Azure subscriptions you must use Azure SDK.要获得 Azure 订阅,您必须使用 Azure SDK。

PS and you can't issue oauth2 token both for graph and azure sdk PS,您不能同时为图形和 azure sdk 发出 oauth2 令牌

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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