< Back

Invoke-MSGraphRequest

Sat Jan 18, 2020 12:08 pm

NAME Invoke-MSGraphRequest



SYNOPSIS





SYNTAX

Invoke-MSGraphRequest -Url <string> [-Content <object>] [-Headers <object>] [-HttpMethod <string>]

[<CommonParameters>]





DESCRIPTION

Sends a custom request with the currently active authentication token.





PARAMETERS

-HttpMethod <string>

The HTTP method to use when making the request.



Required? false

Position? named

Default value GET

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Url <string>

The URL to send the request to.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Headers <object>

The headers that should be sent with the request.



The authentication token (i.e. the "Bearer" header) is automatically added to the request.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Content <object>

The content that should be sent in the body of the request.



PSObject, Hashtable and HttpContent values will be serialized as JSON, and strings will be sent as-is



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

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

System.String

The HTTP method to use when making the request.



System.String

The URL to send the request to.



System.Object

The headers that should be sent with the request.



The authentication token (i.e. the "Bearer" header) is automatically added to the request.



System.Object

The content that should be sent in the body of the request.



PSObject, Hashtable and HttpContent values will be serialized as JSON, and strings will be sent as-is





OUTPUTS





RELATED LINKS