Skip to content

Request-GraphOauth2Grant

SYNOPSIS

Requests OAuth2 permission grants from Microsoft Graph. Caches in global variable.

SYNTAX

Request-GraphOauth2Grant [-Cached] [-Test] [[-Xml] <Boolean>] [[-Return] <String>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Internal helper. Fetches all delegated OAuth2 permission grants from Microsoft Graph and caches them in a session-scoped global variable keyed by client ID. Used by Get-UserApplication and Find-RiskyApplication to resolve which users have consented to which applications without repeated Graph requests.

EXAMPLES

Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

PARAMETERS

-Cached

{{ Fill Cached Description }}

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Test

{{ Fill Test Description }}

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Xml

{{ Fill Xml Description }}

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: $Global:IRT_Config.ExportXml
Accept pipeline input: False
Accept wildcard characters: False

-Return

{{ Fill Return Description }}

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: Objects
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Version: 2.0.0