Access and Tokens
Tokens
Access Token
Calling Azure APIs, like Microsoft Graph or Azure Resource Manager.
1h
Authorization Code flow (OAuth 2.0)
Client Credentials flow (for apps)
Device Code flow (CLI scenarios)
No
Refresh Token
Getting new access tokens without re-authenticating
1h
No
ID Token
Identifying the user (OpenID Connect)
Not limited, must be used once in 90 days
Yes
Authenticate
Microsoft Graph PowerShell
Install Microsoft Graph
Login with credentials
Login with access token
Login with device code flow
Get user auth details
Query permissions needed
Device Code
The below example will authenticate to PowerShell (Application ID 1950a258-227b-4e31-a9cf-717495945fc2)
Microsoft Applications ID
Below list for some application IDs built in microsoft
Microsoft Azure PowerShell
1950a258-227b-4e31-a9cf-717495945fc2
Microsoft Azure CLI
04b07795-8ddb-461a-bbee-02f9e1bf7b46
Portal Azure
c44b4083-3bb0-49c1-b47d-974e53cbdf3c
Microsoft Office
d3590ed6-52b3-4102-aeff-aad2292ab01c
Last updated