Grant-CsGraphPolicy
Use the Grant-CsGraphPolicy cmdlet to assign a previously defined graph policy to a user or to your organization. Graph policies determine whether users can pre-load content or files that are attached to an Outlook meeting invitation into a Microsoft Teams or Skype for Business Online meeting,
Syntax
Identity (Default)
Grant-CsGraphPolicy
[[-Identity] <UserIdParameter>]
[-PolicyName] <String>
[-Tenant <Guid>]
[-DomainController <Fqdn>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
GrantToTenant
Grant-CsGraphPolicy
[-PolicyName] <String>
[-Tenant <Guid>]
[-DomainController <Fqdn>]
[-PassThru]
[-Global]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Microsoft Teams and Skype for Business Online support a Global CsGraphPolicy that is set by default to enable Outlook content pre-load in Microsoft Teams or Skype for Business Online meetings. The Global policy can't be changed by you. Use the Grant-CsGraphPolicy cmdlet to assign a predefined graph policy to users in your organization.
To return a list of all the Role-Based Access Control (RBAC) roles a cmdlet has been assigned to (including any custom RBAC roles you have created), run the following command:
Get-CsAdminRole | Where-Object {$_.Cmdlets -Match "<DesiredCmdletName>"}
Examples
Example 1
Grant-CsGraphPolicy -PolicyName "GraphDisabled" -Identity Ken.Myer
This example grants the "GraphDisabled" policy to Ken Myer.
Parameters
-Confirm
Applicable: Microsoft Teams
The Confirm switch causes the command to pause processing, and requires confirmation to proceed.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DomainController
Applicable: Microsoft Teams
Specifies the domain controller that's used by the cmdlet to read or write the specified data. Valid inputs for this parameter are either the fully qualified domain name (FQDN) or the computer name.
Parameter properties
Type: | Fqdn |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Identity
Applicable: Microsoft Teams
Specifies the identity of the user who will be granted the graph policy.
Parameter properties
Type: | UserIdParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PassThru
Applicable: Microsoft Teams
Enables you to pass a user object through the pipeline that represents the user account being assigned the policy.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PolicyName
Applicable: Microsoft Teams
Specifies the name of the graph policy to grant to the tenant or user. The two options are:
Graph Enabled: Granting this policy will enable the pre-loading content or files that are attached to an Outlook meeting invitation into a Microsoft Teams or Skype for Business Online meeting.
For example, Grant-CsGraphPolicy -PolicyName "Graph Enabled"
.
Graph Disabled: Granting this policy will disable the pre-loading of content, files or attachments attached to an Outlook meeting invitation into a Microsoft Teams or Skype for Business Online meeting.
For example, Grant-CsGraphPolicy -PolicyName "Graph Disabled"
.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 2 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Tenant
Applicable: Microsoft Teams
This parameter is reserved for internal Microsoft use.
Parameter properties
Type: | Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Applicable: Microsoft Teams
The WhatIf switch causes the command to simulate its results. By using this switch, you can view what changes would occur without having to commit those changes.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
System.String
The Grant-CsGraphPolicy cmdlet accepts a pipelined string value representing the Identity of a user account to which the graph policy is being granted.
Outputs
Microsoft.Rtc.Management.ADConnect.Schema.OCSADUserOrAppContact
The Grant-CsGraphPolicy cmdlet returns an object of type Microsoft.Rtc.Management.ADConnect.Schema.OCSADUserOrAppContact when used with the PassThru parameter.