How to Configure Microsoft Teams App Permission Policies Using PowerShell and CsTeamsAppPermissionPolicy

In modern enterprise environments, Microsoft Teams serves as a central hub not only for chat, meetings, and calls, but also for external software integrations, bots, tabs, and automated connectors. The Microsoft Teams App Store features thousands of third-party SaaS applications alongside custom in-house line-of-business (LOB) tools. However, allowing unmanaged app installations introduces severe security risks—such as unauthorized data exfiltration, shadow IT sprawl, and excessive OAuth permissions to corporate data. To enforce compliance, Microsoft 365 administrators control application access through Teams App Permission Policies. Managing these controls via PowerShell using CsTeamsAppPermissionPolicy cmdlets allows automated, scalable governance across the entire tenant.

Understanding Microsoft Teams App Classification Layers

Teams categorizes every installable application into one of three distinct governance silos:

  • Microsoft Apps: First-party applications built and verified by Microsoft (such as Planner, Forms, Power BI, Lists, and SharePoint).
  • Third-Party Apps: Applications published by external commercial software vendors (such as Trello, Jira, GitHub, Zoom, and Asana).
  • Custom Apps: Private line-of-business applications and bots developed internally or uploaded directly via manifest ZIP packages.

Within each category, administrators can configure policies to AllowAllApps, AllowSpecificApps (whitelisting only verified tools), or BlockAllApps.

Connecting to Microsoft Teams PowerShell

To inspect and deploy app permission policies, open an elevated PowerShell window and authenticate to your Microsoft 365 organization:

# Install the Microsoft Teams PowerShell module if not already present
Install-Module -Name MicrosoftTeams -Force -AllowClobber

# Authenticate to the tenant
Connect-MicrosoftTeams

Auditing Existing Teams App Permission Policies

Query the existing global policy and any custom permission policies currently active in the tenant:

# Query all app permission policies
Get-CsTeamsAppPermissionPolicy

# Inspect detailed permissions for the Global (Org-wide default) policy
Get-CsTeamsAppPermissionPolicy -Identity Global | Format-List Identity, MicrosoftAppsType, ThirdPartyAppsType, CustomAppsType

By default, many organizations find that ThirdPartyAppsType is set to AllowAllApps, leaving the tenant vulnerable to unvetted application installs by end users.

Hardening the Global Tenant Policy (Zero-Trust Whitelisting)

To implement a secure baseline across the entire organization, restrict standard users to approved Microsoft tools and explicitly approved third-party integrations:

# Restrict third-party and custom applications to approved whitelists only
Set-CsTeamsAppPermissionPolicy -Identity Global `
    -MicrosoftAppsType AllowAllApps `
    -ThirdPartyAppsType AllowSpecificApps `
    -CustomAppsType BlockAllApps

To add verified third-party applications to the global approved whitelist (such as Jira or Polly):

# Retrieve the application ID from the Teams App Store catalog and add to allowed list
Set-CsTeamsAppPermissionPolicy -Identity Global -ThirdPartyApps @{Add="2a527703-1f6f-4559-a332-d8a7d288cd88"}

Creating a Custom Policy for IT and Engineering Teams

While standard business units should be restricted to verified apps, software development and IT operations teams often require access to developer tools, webhooks, and custom bot staging environments:

# Create a custom policy granting access to custom line-of-business apps
New-CsTeamsAppPermissionPolicy -Identity "Eng-Developer-Policy" `
    -MicrosoftAppsType AllowAllApps `
    -ThirdPartyAppsType AllowSpecificApps `
    -CustomAppsType AllowAllApps `
    -Description "Allows Engineering and IT staff to test internal and custom apps"

To populate specific approved third-party developer integrations for this policy:

# Add GitHub and GitLab integration app IDs to the custom policy
Set-CsTeamsAppPermissionPolicy -Identity "Eng-Developer-Policy" `
    -ThirdPartyApps @{Add="b625cf04-436f-44de-9e23-7fa3458bfb4a", "51b94553-5683-4318-ae37-a1691a3848b7"}

Assigning Custom Policies to Users and Security Groups

Deploy the custom app permission policy to target engineers or entire security groups:

# Assign the custom policy to an individual user
Grant-CsTeamsAppPermissionPolicy -Identity "[email protected]" -PolicyName "Eng-Developer-Policy"

# Assign the policy to a Microsoft 365 security group using its Azure AD Object ID
Grant-CsTeamsAppPermissionPolicy -Group "d921e432-81c4-4b52-a311-9214781df334" -PolicyName "Eng-Developer-Policy" -Rank 1

Auditing Effective User Permissions and Removing Blocked Apps

To verify which app permission policy governs a specific user account:

# Audit the effective app policy assigned to an employee
Get-CsUserPolicyAssignment -Identity "[email protected]" -PolicyType TeamsAppPermissionPolicy

If an existing third-party application is flagged for security vulnerabilities or breaches compliance, remove it from the allowed list immediately across all policies:

# Revoke permission for a specific app ID from the Global policy
Set-CsTeamsAppPermissionPolicy -Identity Global -ThirdPartyApps @{Remove="2a527703-1f6f-4559-a332-d8a7d288cd88"}

Once revoked, Teams immediately blocks new installations of the tool and disables the app’s interactive cards and bots across all corporate chat channels.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.