# Get-MtGraphScope

Returns the list of Graph scopes required to run Maester.

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

## SYNOPSIS

Returns the list of Graph scopes required to run Maester.

## SYNTAX

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

## DESCRIPTION

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

## EXAMPLES

### EXAMPLE 1

```powershell
Connect-MgGraph -Scopes (Get-MtGraphScope)
```

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

### EXAMPLE 2

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

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

### EXAMPLE 3

```powershell
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

```powershell
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.

### EXAMPLE 5

```powershell
Connect-MgGraph -Scopes (Get-MtGraphScope -IncludePreview)
```

Connects to Microsoft Graph with the additional scopes required by preview tests.

## PARAMETERS

### -SendMail

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

```yaml
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).

```yaml
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.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

### -IncludePreview

If specified, the cmdlet will include scopes required by preview tests.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

### -ProgressAction

Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.

```yaml
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](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

## NOTES

## RELATED LINKS

[https://maester.dev/docs/commands/Get-MtGraphScope](https://maester.dev/docs/commands/Get-MtGraphScope)
