Skip to content

Instantly share code, notes, and snippets.

@ehrnst
Created November 14, 2017 16:30
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 ehrnst/d47ddad52c33f4663f3d7ef2819965bd to your computer and use it in GitHub Desktop.
Save ehrnst/d47ddad52c33f4663f3d7ef2819965bd to your computer and use it in GitHub Desktop.
$result = Get-AADAppoAuthToken -ClientID $AzureApplicationID -ClientSecret $ClientSecret -TenantId $TenantId
$AuthKey = "Bearer " + ($result.access_token)
$authHeader = @{
'Content-Type' = 'application/json'
'Accept' = 'application/json'
'Authorization' = $AuthKey
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment