Update-M365DSCAllowedGraphScopes¶
Description¶
Resolves delegated Graph scopes required by selected resources and calls Connect-MgGraph with those scopes so consent can be granted.
Output¶
This function does not generate any output.
Parameters¶
| Parameter | Required | DataType | Default Value | Allowed Values | Description |
|---|---|---|---|---|---|
| ResourceNameList | False | String[] | Specifies resource names used to determine required scopes. | ||
| All | False | SwitchParameter | Indicates that all Microsoft365DSC resources should be included. | ||
| Type | True | String | Read, Update | Specifies whether read or update scopes should be requested. | |
| Environment | False | String | Global | Global, China, USGov, USGovDoD, Germany | Specifies the Microsoft Graph cloud environment. |
Examples¶
-------------------------- EXAMPLE 1 --------------------------
Update-M365DSCAllowedGraphScopes -ResourceNameList @('AADUSer', 'AADApplication') -Type 'Read'
-------------------------- EXAMPLE 2 --------------------------
Update-M365DSCAllowedGraphScopes -All -Type 'Update' -Environment 'Global'