< Back
Get-GraphAuthToken
Post
NAME Get-GraphAuthToken
SYNOPSIS
Get a oAuth token to access Microsoft Graph API
SYNTAX
Get-GraphAuthToken [<CommonParameters>]
Get-GraphAuthToken -AADTenant <String> -ClientId <String> -ClientSecret <String> [<CommonParameters>]
Get-GraphAuthToken -AADTenant <String> -RedirectUri <String> -Credential <PSCredential> -ClientId <String>
-ClientSecret <String> [<CommonParameters>]
DESCRIPTION
Get a oAuth token to access Microsoft Graph API. Token will be valid for 2 hours.
PARAMETERS
-AADTenant <String>
"Name": "AADTenantName"
"Name": "ClientId"
"Name": "RedirectUri"
"Name": "UserName"
"Name": "Password"
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RedirectUri <String>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ClientId <String>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ClientSecret <String>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
This is a preview/beta version. Please send any comments to jgs@coretech.dk
Developed by MVP Jakob Gottlieb Svendsen - jakob@runbook.guru - jgs@coretech.dk
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-GraphAuthToken -AADTenant "runbookguru.onmicrosoft.com" -ClientId
"cdec3c46-b1cd-4ce7-859a-b6fac1ceafee" -RedirectUri "http://www.runbook.guru" -Credential (get-credential)
RELATED LINKS
http://graph.microsoft.io/
SYNOPSIS
Get a oAuth token to access Microsoft Graph API
SYNTAX
Get-GraphAuthToken [<CommonParameters>]
Get-GraphAuthToken -AADTenant <String> -ClientId <String> -ClientSecret <String> [<CommonParameters>]
Get-GraphAuthToken -AADTenant <String> -RedirectUri <String> -Credential <PSCredential> -ClientId <String>
-ClientSecret <String> [<CommonParameters>]
DESCRIPTION
Get a oAuth token to access Microsoft Graph API. Token will be valid for 2 hours.
PARAMETERS
-AADTenant <String>
"Name": "AADTenantName"
"Name": "ClientId"
"Name": "RedirectUri"
"Name": "UserName"
"Name": "Password"
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RedirectUri <String>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ClientId <String>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ClientSecret <String>
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
This is a preview/beta version. Please send any comments to jgs@coretech.dk
Developed by MVP Jakob Gottlieb Svendsen - jakob@runbook.guru - jgs@coretech.dk
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-GraphAuthToken -AADTenant "runbookguru.onmicrosoft.com" -ClientId
"cdec3c46-b1cd-4ce7-859a-b6fac1ceafee" -RedirectUri "http://www.runbook.guru" -Credential (get-credential)
RELATED LINKS
http://graph.microsoft.io/