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.
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
Answered By – chingis
Answer Checked By – Clifford M. (GoLangFix Volunteer)