< Back
Get-Office365Token
Post
NAME Get-Office365Token
SYNOPSIS
Get a oAuth token to access Microsoft Graph API (Both support WW AND Gallatin)
SYNTAX
Get-Office365Token [-AADTenant] <String> [-ClientId] <String> [-Credential] <PSCredential> [[-IsGallatin]
<Boolean>] [<CommonParameters>]
DESCRIPTION
Get a oAuth token to access Microsoft Graph API. Token will be valid for 2 hours.
PARAMETERS
-AADTenant <String>
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ClientId <String>
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-IsGallatin <Boolean>
Required? false
Position? 4
Default value True
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
Developed by Ares Chen
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-Office365Token -AADTenant "modtsp.partner.onmschina.cn" -ClientId
"8fad9a3d-ce06-4d85-8f9a-873164f0cafc" -Credential (Get-Credential)
RELATED LINKS
http://graph.microsoft.io/
SYNOPSIS
Get a oAuth token to access Microsoft Graph API (Both support WW AND Gallatin)
SYNTAX
Get-Office365Token [-AADTenant] <String> [-ClientId] <String> [-Credential] <PSCredential> [[-IsGallatin]
<Boolean>] [<CommonParameters>]
DESCRIPTION
Get a oAuth token to access Microsoft Graph API. Token will be valid for 2 hours.
PARAMETERS
-AADTenant <String>
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ClientId <String>
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-IsGallatin <Boolean>
Required? false
Position? 4
Default value True
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
Developed by Ares Chen
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-Office365Token -AADTenant "modtsp.partner.onmschina.cn" -ClientId
"8fad9a3d-ce06-4d85-8f9a-873164f0cafc" -Credential (Get-Credential)
RELATED LINKS
http://graph.microsoft.io/