Skip to main content
Version: 2.0.1 (preview)

Get-MtGraphScope

SYNOPSISโ€‹

Returns the list of Graph scopes required to run Maester.

SYNTAXโ€‹

Get-MtGraphScope [-SendMail] [-SendTeamsMessage] [-Privileged] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

DESCRIPTIONโ€‹

Use this cmdlet to connect to Microsoft Graph using Connect-MgGraph.

EXAMPLESโ€‹

EXAMPLE 1โ€‹

Connect-MgGraph -Scopes (Get-MtGraphScope)

Connects to Microsoft Graph with the required scopes to run Maester.

EXAMPLE 2โ€‹

Connect-MgGraph -Scopes (Get-MtGraphScope -SendMail)

Connects to Microsoft Graph with the required scopes to run Maester and send email.

EXAMPLE 3โ€‹

Connect-MgGraph -Scopes (Get-MtGraphScope -SendTeamsMessage)

Connects to Microsoft Graph with the required scopes to run Maester and send messages to a Teams Channel.

EXAMPLE 4โ€‹

Connect-MgGraph -Scopes (Get-MtGraphScope -PrivilegedScopes)

Connects to Microsoft Graph with the required scopes to run Maester for all tests, including those requiring read write APIs.

PARAMETERSโ€‹

-SendMailโ€‹

If specified, the cmdlet will include the scope to send email (Mail.Send).

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-SendTeamsMessageโ€‹

If specified, the cmdlet will include the scope to send Teams Channel Messages (ChannelMessage.Send).

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Privilegedโ€‹

If specified, the cmdlet will include the scope for read write endpoints.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
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โ€‹

https://maester.dev/docs/commands/Get-MtGraphScope