User Profile
AndyBrunner
Copper Contributor
Joined Jan 20, 2020
User Widgets
Recent Discussions
Re: Unsupported but very useful way to use the hidden Azure API
Hi everyone I do have something to add here. Until recently, I was retrieving new access tokens by providing the API uri as a resource ( https://main.iam.ad.ext.azure.com ). For me, this does not work anymore. I get a Bearer token, but it's useless... Now I do have to provide the resource's GUID to get a valid Bearer token. I do work with the https://www.powershellgallery.com/packages/Az.Accounts module, and I know two ways to get a token: $resource = '74658136-14ec-4630-ad9b-26e160ff0fc6'; # v1 $token1 = (Get-AzAccessToken -ResourceUrl $resource -TenantId (Get-AzContext).Tenant.Id.ToString()).token # v2 $currentAzureContext = Get-AzContext $token2 = [Microsoft.Azure.Commands.Common.Authentication.AzureSession]::Instance.AuthenticationFactory.Authenticate($currentAzureContext.Account, $currentAzureContext.Environment, $currentAzureContext.Tenant.Id.ToString(), $null, [Microsoft.Azure.Commands.Common.Authentication.ShowDialog]::Never, $null, $resource).AccessToken13KViews2likes0CommentsRe: Unsupported but very useful way to use the hidden Azure API
Malathi Sekkappan Open a Browser like Firefox or Chrome, open the Developer Tools (F12), do the change you want to do by the API in the GUI on portal.azure.com, and check what's going on on the Network-Tab of the Developer Tools, because the GUI is calling the same API. And there you'll see the call to the API with all the headers required Just lookout for the call to https://main.iam.ad.ext.azure.com PS. Don't forget to provide the Bearer Token and the x-ms-client-request-id16KViews2likes0CommentsRe: How do you create separate shortcuts for different profiles?
AllanRoss if I pin Edge to the taskbar I get a shortcut with this command "C:\Program Files (x86)\Microsoft\Edge Beta\Application\msedge.exe" --profile-directory="Profile 1" open the directory C:\Users\<username>\AppData\Local\Microsoft\Edge Beta\User Data\ and check if there are Profile folders called like Profile 0 Profile 1 etc.... if you need to identify them: inside these directories you have a file called Preferences open it with a text editor (i.e. notepad.exe) copy everything into https://jsonbeautifier.org/ click Format/Beautify and then open the profile tree there you find the name of the Profile associated to your profile folder "Profile x"67KViews3likes0Comments
Recent Blog Articles
No content to show