Skip to content

Instantly share code, notes, and snippets.

@pmatthews05
Created November 25, 2019 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmatthews05/1bd30320140a19f70ded796866526228 to your computer and use it in GitHub Desktop.
Save pmatthews05/1bd30320140a19f70ded796866526228 to your computer and use it in GitHub Desktop.
#Once signed into Azure CLI
$Token = az account get-access-token --resource-type "aad-graph" | ConvertFrom-Json
$AzAccount = az account show | ConvertFrom-Json
Connect-AzureAD -AadAccessToken $($Token.accessToken) -AccountId:$($AzAccount.User.Name) -TenantId:$($AZAccount.tenantId)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment