< Back

Invoke-Office365GraphRequest

Sat Jan 18, 2020 5:37 pm

NAME Invoke-Office365GraphRequest



SYNOPSIS

Invoke a request to the Microsoft Graph API(Both support WW AND Gallatin)





SYNTAX

Invoke-Office365GraphRequest [[-Token] <Object>] [[-url] <Object>] [[-Method] <Object>] [[-Body] <Object>]

[[-contentType] <Object>] [[-file] <Object>] [<CommonParameters>]





DESCRIPTION

Invoke a request to the Microsoft Graph API using the Token





PARAMETERS

-Token <Object>



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-url <Object>



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Method <Object>



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Body <Object>



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-contentType <Object>



Required? false

Position? 5

Default value application/json

Accept pipeline input? false

Accept wildcard characters? false



-file <Object>



Required? false

Position? 6

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





Developed by Ares Chen



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



PS C:\\>$Token = Get-Office365Token -AADTenant "modtsp.partner.onmschina.cn" -ClientId

"8fad9a3d-ce06-4d85-8f9a-873164f0cafc" -Credential (Get-Credential)



Invoke-Office365GraphRequest -url "https://microsoftgraph.chinacloudapi.cn/v1.0/me" -Token $Token -Method GET











RELATED LINKS

http://graph.microsoft.io/