0
votes

I am trying to get the users subscription using users access token. After that will create users cdn profile for azure and then adding the endpoint to created cdn under users subscription.

After getting access token for user account from https://login.microsoftonline.com and tried to get the total subscriptions of user (https://management.azure.com/subscriptions?api-version=2015-11-01), api returns me no subscription records. But in azure account I could see subscriptions under user account after login.

Please need help.

1
Do you get error log? Use the API, I could get my subscription information.Shui shengbao

1 Answers

0
votes

According to your description, I assume that you may have multiple tenants. It seems that there is no subcription in the tenant which you try to get the access token. Please have a try to use the tenant which has the subscription. We could check the tenant from the Azure portal, more details please refer to the screenshot.

enter image description here

We could test it easily, I try to get the authorization from the Azure portal, more details please refer to Use the authorization code to request an access token.

enter image description here

And test it with fiddler, it works correctly.

enter image description here