Get-PnPAccessToken

Returns the current OAuth Access token

Syntax

Get-PnPAccessToken
   [-Decoded [<SwitchParameter>]]
                     [-ByPassPermissionCheck [<SwitchParameter>]]

Description

Gets the OAuth 2.0 Access Token to consume the Microsoft Graph API. Doesn't work with all Connect-PnPOnline options.

Examples

------------------EXAMPLE 1------------------

Get-PnPAccessToken

Gets the OAuth 2.0 Access Token to consume the Microsoft Graph API

Parameters

-ByPassPermissionCheck

Allows the check for required permissions in the access token to be bypassed when set to $true

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Decoded

Returns the details from the access token in a decoded manner

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False