'Azure subscriptions list returns empty result with MS Graph SDK

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.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source