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
Grant-CsGraphPolicy
[[-Identity] <UserIdParameter>]
[-PolicyName] <String>
[-Tenant <Guid>]
[-DomainController <Fqdn>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
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
The Confirm switch causes the command to pause processing, and requires confirmation to proceed.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Microsoft Teams |
-DomainController
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.
Type: | Fqdn |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Microsoft Teams |
-Identity
Specifies the identity of the user who will be granted the graph policy.
Type: | UserIdParameter |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Microsoft Teams |
-PassThru
Enables you to pass a user object through the pipeline that represents the user account being assigned the policy.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Microsoft Teams |
-PolicyName
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"
.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Microsoft Teams |
-Tenant
This parameter is reserved for internal Microsoft use.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Microsoft Teams |
-WhatIf
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.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Microsoft Teams |
Inputs
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
The Grant-CsGraphPolicy cmdlet returns an object of type Microsoft.Rtc.Management.ADConnect.Schema.OCSADUserOrAppContact when used with the PassThru parameter.