Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Resource-specific consent (RSC) permissions preapproval gives you granular control over the RSC permissions an app can request when it's installed. RSC permissions are granted to an app at installation time. With preapproval policies, you can define the maximum permissions an app can request from users and receive consent for during installation.
For an RSC permissions preapproval policy to take effect, the app must be allowed for installation in your organization. If the app isn't available for installation, its preapproval policy doesn't take effect. For more information, see Manage apps in Teams admin center.
You can create a detailed preapproval policy based on the app ID, permissions, and sensitivity of the accessed data. These policies are designed for admins who need advanced custom policies for their organization.
By default, Microsoft manages the preapproval policies. Keep the ManagedByMicrosoft state so that Microsoft's security team can manage the policy based on security best practices.
Note
- Preapproval of RSC permissions is available only in public developer preview.
- Preapproval of RSC permissions and its operating procedures are subject to change.
Set up PowerShell to manage preapproval of RSC permissions
You manage RSC permissions preapproval through Microsoft Graph PowerShell. For setup instructions, see Get started with Microsoft Graph PowerShell.
To create, manage, and delete RSC preapproval policies, grant the following permissions:
TeamworkAppSettings.ReadWrite.All.Policy.ReadWrite.Authorization.AppCatalog.Read.All.Policy.ReadWrite.PermissionGrant.InformationProtectionPolicy.Read.Application.ReadWrite.All.
Note
You need Global Administrator privileges to connect Microsoft Graph to your organization for the first time.
The following example connects to Microsoft Graph to manage RSC preapproval policies:
Connect-MgGraph -Scopes @('TeamworkAppSettings.ReadWrite.All', 'Policy.ReadWrite.Authorization', 'AppCatalog.Read.All', 'Policy.ReadWrite.PermissionGrant', 'InformationProtectionPolicy.Read', 'Application.ReadWrite.All')
Allow RSC permissions for apps in your organization
For both team-specific and chat-specific RSC permissions, you can set one of four states for your organization. Except for DisabledForAllApps, these states allow RSC permissions to different degrees. Set the states with the Set-MgBetaChatRscConfiguration and Set-MgBetaTeamRscConfiguration cmdlets.
For example, to allow RSC permissions for all unblocked apps in your organization, use Set-MgBetaTeamRscConfiguration -State EnabledForAllApps.
The following table describes the states:
| Configuration | Description |
|---|---|
ManagedByMicrosoft |
A dynamic policy administered by Microsoft. It might be updated based on best security practices. By default, this state enables RSC for all unblocked apps in the organization. |
EnabledForAllApps |
Users can consent to RSC permissions for any unblocked apps in the organization. |
EnabledForPreApprovedAppsOnly |
Users in the organization can consent to only those unblocked apps that also have an explicit preapproval policy associated with them. Use this option only if you want to explicitly limit the allowed RSC permissions on a per-app basis. |
DisabledForAllApps |
Users can't consent to the RSC permissions required by any app, even if the app is unblocked in the organization. This state doesn't allow installation of apps that need RSC permissions. |
Warning
If you change your chat or team RSC configuration to DisabledForAllApps, it disables preapproval in your tenant. Users encounter errors when they install RSC-enabled apps.
Enable RSC permissions for all unblocked apps in the organization
To enable RSC for all unblocked apps in your organization, change the RSC permission setting state to EnabledForAllApps. Set the state for both team and chat RSC settings as follows:
Set-MgBetaTeamRscConfiguration -State EnabledForAllApps
Set-MgBetaChatRscConfiguration -State EnabledForAllApps
Enable RSC for a specific set of apps only
You can create a preapproval policy for specific apps with the permissions and sensitivity labels of the data you want to preapprove. The following sections describe how to create a preapproval policy with and without a sensitivity label.
Create a preapproval policy based on app ID and permissions
Preapproval policies allow users in your organization to consent to RSC permissions for a specific set of apps. You can determine which RSC-enabled apps your organization can access without limiting RSC permissions for all apps in your organization.
To create a preapproval policy without a sensitivity label, you need:
- The Teams app ID.
- The RSC permissions associated with the app.
- Teams Administrator or Global Administrator privileges in your tenant.
Use the New-MgBetaTeamAppPreApproval cmdlet with the app ID and the RSC permissions you want to preapprove. Specify the permissions with the appropriate parameter:
| Configuration | Description |
|---|---|
ResourceSpecificApplicationPermissionsAllowedForChats |
Use this parameter for chat RSC permissions. For a list of permissions, see RSC permissions. |
ResourceSpecificApplicationPermissionsAllowedForTeams |
Use this parameter for team RSC permissions. For a list of permissions, see RSC permissions. |
To preapprove an app with team RSC permissions:
New-MgBetaTeamAppPreapproval -TeamsAppId c626ce8b-6d15-4c07-bfb1-a5fd0bc3c20e -ResourceSpecificApplicationPermissionsAllowedForTeams @('ChannelMessage.Read.Group') -TeamLevelSensitivityLabelCondition AnySensitivityLabel
To preapprove an app with chat RSC permissions:
New-MgBetaTeamAppPreapproval -TeamsAppId c626ce8b-6d15-4c07-bfb1-a5fd0bc3c20e -ResourceSpecificApplicationPermissionsAllowedForChats @('OnlineMeeting.ReadBasic.Chat')
To preapprove an app with both team and chat RSC permissions:
New-MgBetaTeamAppPreapproval -TeamsAppId c626ce8b-6d15-4c07-bfb1-a5fd0bc3c20e -ResourceSpecificApplicationPermissionsAllowedForChats @('OnlineMeeting.ReadBasic.Chat') -ResourceSpecificApplicationPermissionsAllowedForTeams @('ChannelMessage.Read.Group') -TeamLevelSensitivityLabelCondition AnySensitivityLabel
Warning
Your preapproval policy creation might fail if you associate permissions with the wrong permission type. Ensure that chat RSC permissions end with .Chat and team RSC permissions end with .Group.
Create a preapproval policy based on app ID, permissions and sensitivity labels
You can create preapproval policies for RSC permissions that apply to specific sensitivity labels in your tenant. This approach lets you control the data that RSC-enabled apps can access.
You can preapprove specific permissions in addition to specific sensitivity labels. You can also allow all RSC consent requests for a particular permission. To create a preapproval policy, you need:
- The Teams app ID.
- The RSC permissions associated with the app.
- The sensitivity label ID. You don't need this ID if the policy applies to all sensitivity labels or if you preapprove only chat RSC permissions.
- Teams Administrator or Global Administrator privileges in your tenant.
Use the New-MgBetaTeamAppPreApproval cmdlet with the app ID, permissions, and sensitivity label information. Specify the permissions with the appropriate parameter:
| Configuration | Description |
|---|---|
ResourceSpecificApplicationPermissionsAllowedForChats |
Use this parameter for chat RSC permissions. For a list of permissions, see RSC permissions. |
ResourceSpecificApplicationPermissionsAllowedForTeams |
Use this parameter for team RSC permissions. For a list of permissions, see RSC permissions. |
Use SpecificSensitivityLabel to apply the RSC preapproval policy to specific sensitivity labels, as shown in the following example:
New-MgBetaTeamAppPreapproval -TeamsAppId c626ce8b-6d15-4c07-bfb1-a5fd0bc3c20e -ResourceSpecificApplicationPermissionsAllowedForTeams @('ChannelMessage.Read.Group') -TeamLevelSensitivityLabelCondition SpecificSensitivityLabel -SpecificSensitivityLabelIdsApplicableToTeams @('4de11089-adb9-4be8-9b7a-8336be68f3c4')
Change RSC configuration to only allow apps with custom defined preapproval policies
After you create your preapproval policies, change your organization's RSC settings to use them. This setting is more restrictive and might cause some apps not to function for your users. Change the state of your organization's team and chat RSC settings as follows:
Set-MgBetaTeamRscConfiguration -State EnabledForPreApprovedAppsOnly
Set-MgBetaChatRscConfiguration -State EnabledForPreApprovedAppsOnly
Manage the existing preapproval policies
After you create a preapproval policy, you can modify its permissions and sensitivity labels. When an app adds permissions, update its preapproval policy to include the new permissions so that the app can be installed in your tenant. You need the same information to manage an existing preapproval policy as you do to create one.
You can also delete an existing preapproval policy to stop preapproving an app's RSC permissions.
Update an existing preapproval policy
Use the Update-MgBetaTeamAppPreApproval cmdlet to update a preapproval policy. Specify the type of RSC permissions with the appropriate parameter:
| Configuration | Description |
|---|---|
ResourceSpecificApplicationPermissionsAllowedForChats |
Use this parameter for chat RSC permissions. For a list of permissions, see RSC permissions. |
ResourceSpecificApplicationPermissionsAllowedForTeams |
Use this parameter for team RSC permissions. For a list of permissions, see RSC permissions. |
Update the preapproval policy for chat RSC
Use the following cmdlet to update chat RSC permissions:
Update-MgBetaTeamAppPreapproval -TeamsAppId c626ce8b-6d15-4c07-bfb1-a5fd0bc3c20e -ResourceSpecificApplicationPermissionsAllowedForChats @('OnlineMeeting.ReadBasic.Chat', 'TeamsAppInstallation.Read.Chat')
Update the preapproval policy for team RSC
Use the following cmdlet to update team RSC permissions:
Update-MgBetaTeamAppPreapproval -TeamsAppId c626ce8b-6d15-4c07-bfb1-a5fd0bc3c20e -ResourceSpecificApplicationPermissionsAllowedForTeams @('ChannelMessage.Read.Group', 'TeamsAppInstallation.Read.Group') -TeamLevelSensitivityLabelCondition AnySensitivityLabel
To change a preapproval policy from specific sensitivity labels to all sensitivity labels, set TeamLevelSensitivityLabelCondition to AnySensitivityLabel and clear SpecificSensitivityLabelIdsApplicableToTeams:
Update-MgBetaTeamAppPreapproval -TeamsAppId c626ce8b-6d15-4c07-bfb1-a5fd0bc3c20e -ResourceSpecificApplicationPermissionsAllowedForTeams @('ChannelMessage.Read.Group') -TeamLevelSensitivityLabelCondition AnySensitivityLabel -SpecificSensitivityLabelIdsApplicableToTeams $null
Note
Include all relevant permissions in your Update-MgBetaTeamAppPreApproval cmdlet, even if you already declared them in the existing preapproval.
Delete an existing preapproval policy
To stop preapproving an app's RSC permissions, delete its preapproval policy. You need the Teams app ID.
Use the Remove-MgBetaTeamAppPreapproval cmdlet:
Remove-MgBetaTeamAppPreapproval -TeamsAppId c626ce8b-6d15-4c07-bfb1-a5fd0bc3c20e