Muokkaa

Jaa


Grant-CsTeamsAppPermissionPolicy

NOTE: You can use this cmdlet to assign a specific custom policy to a user. We require that all creation and modification of app setup polices (not including the assignment or removal of policies from users) happens in the Microsoft Teams & Skype for Business Admin Center to ensure that the policy matches your expectations for the end user experience. This cmdlet is not supported for tenants that migrated to app centric management feature as it replaced permission policies. While the cmdlet may succeed, the changes aren't applied to the tenant.

As an admin, you can use app permission policies to allow or block apps for your users. Learn more about the app permission policies at /microsoftteams/teams-app-permission-policies and about app centric management at /microsoftteams/app-centric-management.

Syntax

Grant-CsTeamsAppPermissionPolicy []
Grant-CsTeamsAppPermissionPolicy
     [-Identity] <String>
     [[-PolicyName] <String>]
     [<CommonParameters>]
Grant-CsTeamsAppPermissionPolicy
     [[-PolicyName] <String>]
     [-Group] <String>
     [-Rank] <Int32>
     [<CommonParameters>]
Grant-CsTeamsAppPermissionPolicy
     [[-PolicyName] <String>]
     [-Global]
     [-Force]
     [<CommonParameters>]

Description

NOTE: You can use this cmdlet to assign a specific custom policy to a user. We require that all creation and modification of app setup polices (not including the assignment or removal of policies from users) happens in the Microsoft Teams & Skype for Business Admin Center to ensure that the policy matches your expectations for the end user experience.

As an admin, you can use app permission policies to enable or block specific apps for your users. Learn more about the App Permission Policies: /microsoftteams/teams-app-permission-policies.

Examples

Example 1

PS C:\> Grant-CsTeamsAppPermissionPolicy -Identity "Ken Myer" -PolicyName StudentAppPermissionPolicy

In this example, a user with identity "Ken Myer" is being assigned the StudentAppPermissionPolicy

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DomainController

Do not use.

Type:Fqdn
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Global

Resets the values in the global policy to match those in the provided (PolicyName) policy. Note that this means all users with no explicit policy assigned will have these new policy settings.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Group

Specifies the group used for the group policy assignment.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Identity

The user to whom the policy should be assigned.

Type:UserIdParameter
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PolicyName

The name of the custom policy that is being assigned to the user. To remove a specific assignment and fall back to the default tenant policy, you can assign to $Null.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Rank

The rank of the policy assignment, relative to other group policy assignments for the same policy type.

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Tenant

Do not use.

Type:System.Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Rtc.Management.AD.UserIdParameter

Outputs

System.Object