Home > Net >  Azure subscriptions list returns empty result with MS Graph SDK
Azure subscriptions list returns empty result with MS Graph SDK

Time:03-07

For some reason sdk doesn't return subscriptions although I have one. I have added Subscription.Read.All permission to my app registration.

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

I use the same code to get Organizations and it works fine. I use oauth2 token for sdk authentication.

CodePudding user response:

Ok, these subscriptions from Graph SDK are a completely different thing. To get Azure subscriptions you must use Azure SDK.

P.S. and you can't issue oauth2 token both for graph and azure sdk

  • Related