Skip to main content

teams app rsc set

Declaratively set RSC permissions to an exact list

Usage​

teams app rsc set <teamsAppId> [options]

Arguments​

ArgumentDescriptionRequired
teamsAppIdTeams app IDYes

Options​

FlagDescription
--permissions <list>Comma-separated permission names (e.g. TeamSettings.ReadWrite.Group,ChannelMessage.Read.Group). Pass "" to clear all.
--json[OPTIONAL] Output as JSON

Behavior​

Computes the diff between the app's current RSC permissions and the desired list:

  • Adds permissions in the list that are missing from the app
  • Removes permissions on the app that are not in the list
  • Reports permissions that are already present (unchanged)

Permission types (Application/Delegated) are automatically inferred from the RSC catalog. Only catalog permissions are accepted — use teams app rsc add for custom permissions not in the catalog.

If the app already has non-catalog permissions (added via teams app rsc add), the command will error rather than silently removing them. Remove them first with teams app rsc remove before using set.

Examples​

# Set permissions to exactly these two
teams app rsc set abc123 --permissions TeamSettings.ReadWrite.Group,ChannelMessage.Read.Group

# JSON output for automation
teams app rsc set abc123 --permissions TeamSettings.ReadWrite.Group --json

# Clear all RSC permissions
teams app rsc set abc123 --permissions ""

JSON output​

{
"added": [{ "name": "TeamSettings.ReadWrite.Group", "type": "Application" }],
"removed": [{ "name": "ChannelMessage.Read.Group", "type": "Application" }],
"unchanged": []
}