Skip to content
Advertisement

Is there any way to get logged in user azure subscription Id’s using @azure/msal-angular?

I am using @azure/msal-angular to authenticate user. I have done it smoothly as in response i am getting id_Token, access_Token and tenant Id. Now i need to get logged in user’s azure subscriptions. Is there any way to do it using msal or azure is providing any java script libraries through which i can get user’s subscriptions ?

Advertisement

Answer

Do a GET to https://management.azure.com/subscriptions?api-version=2020-01-01 using their api.

You need to provide their token in the Authorization header (i.e. BEARER <TOKEN>).

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement