Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Grant-CsApplicationAccessPolicy
- Module:
- MicrosoftTeams PowerShell module
Assigns a per-user application access policy to one or more users. After assigning an application access policy to a user, the applications configured in the policy will be authorized to access online meetings on behalf of that user.
Syntax
Identity
Grant-CsApplicationAccessPolicy
[-Identity <UserIdParameter>]
[-PolicyName <String>]
[-Global]
[<CommonParameters>]
GrantToTenant (Default)
Grant-CsApplicationAccessPolicy
[-Global]
[-PassThru]
[-PolicyName <String>]
[-MsftInternalProcessingMode <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
GrantToGroup
Grant-CsApplicationAccessPolicy
-Group <String>
[-PassThru]
[-PolicyName <String>]
[-MsftInternalProcessingMode <String>]
[-Rank <Int32>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
This cmdlet assigns a per-user application access policy to one or more users. After assigning an application access policy to a user, the applications configured in the policy will be authorized to access online meetings on behalf of that user.Note: You can assign only 1 application access policy at a time to a particular user. Assigning a new application access policy to a user will override the existing application access policy if any.
Examples
Assign an application access policy to a user
PS C:\> Grant-CsApplicationAccessPolicy -Identity "dc17674c-81d9-4adb-bfb2-8f6a442e4624" -PolicyName "ASimplePolicy"
The command shown above assigns the per-user application access policy "ASimplePolicy" to the user with object ID "dc17674c-81d9-4adb-bfb2-8f6a442e4624".
Unassign an application access policy from a user
PS C:\> Grant-CsApplicationAccessPolicy -Identity "dc17674c-81d9-4adb-bfb2-8f6a442e4624" -PolicyName $Null
In the command shown above, any per-user application access policy previously assigned to the user with user (object) ID "dc17674c-81d9-4adb-bfb2-8f6a442e4624" is unassigned from that user; as a result, applications configured in the policy can no longer access online meetings on behalf of that user. To unassign a per-user policy, set the PolicyName to a null value ($Null).
Assign an application access policy to all users in the tenant
PS C:\> Get-CsOnlineUser | Grant-CsApplicationAccessPolicy -PolicyName "ASimplePolicy"
The command shown above assigns the per-user application access policy ASimplePolicy to all the users in the tenant. To do this, the command first calls the Get-CsOnlineUser cmdlet to get all user accounts enabled for Microsoft Teams or Skype for Business Online. Those user accounts are then piped to the Grant-CsApplicationAccessPolicy cmdlet, which assigns each user the application access policy "ASimplePolicy".
Assign an application access policy to users who have not been assigned one
PS C:\> Grant-CsApplicationAccessPolicy -PolicyName "ASimplePolicy" -Global
The command shown above assigns the per-user application access policy "ASimplePolicy" to all the users in the tenant, except any that have an explicit policy assignment.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-Global
When you use this cmdlet without specifying a user identity, the policy applies to all users in your tenant, except any that have an explicit policy assignment. For example, if the user already have application access policy "A" assigned, and tenant admin assigns "B" globally, then application access policy "A" will take effect for the user.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Group
Specifies the group used for the group policy assignment.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Identity
Indicates the user (object) ID of the user account to be assigned the per-user application access policy.
Parameter properties
| Type: | UserIdParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-MsftInternalProcessingMode
For internal use only.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PassThru
Allows the user to indicate whether the cmdlet passes an output object through the pipeline, in this case, after a process is stopped. Be aware that this parameter is tied to the cmdlet itself instead of to a property of the input object.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PolicyName
Name of the policy to be assigned. The PolicyName is simply the policy Identity without the policy scope (the "tag:" prefix). For example, a policy with the Identity tag:ASimplePolicy has a PolicyName equal to ASimplePolicy.
Parameter properties
| Type: | PSListModifier |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Rank
The rank of the policy assignment, relative to other group policy assignments for the same policy type.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
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.
Related Links
Feedback
Was this page helpful?
