Hide Apps in Microsoft Teams (Disable App requests)

Users can view all apps available in the Teams app store (Web client or desktop version of Teams) by default. They can browse, search, or discover the apps and Install or Request them in Teams.

A Teams administrator can manage the apps and only allow certain apps to be installed in Teams. However, users can still view and discover blocked third-party apps. The blocked apps will show a lock symbol with a Request button.

Blocked apps in MS Teams with a lock symbol and Request button
Blocked apps in MS Teams with a lock symbol and Request button

When a user clicks the request button, the App request will be generated on the Teams administrator portal. Once the administrator approves the request, users can install the application in MS Teams.

However, you can follow the steps in this blog post to ensure users see only the approved apps and hide all blocked apps in the Microsoft Teams app store.

To approve or block applications from Teams administrator admin center. Sign in to the Teams admin center > Teams apps > Permission policies

Method 1: Hide All Blocked Apps using Graph Explorer

Apps can be approved for Installation by the Teams administrator using an App permission policy. An admin can create a list of approved apps in the policy and assign them to users. However, blocked apps continue appearing in the app store even if they are unavailable for installation. Let’s check the steps to hide the blocked apps.

  1. Launch the Graph Explorer web page and Sign in using administrator rights.
Click on Sign in Icon
Provide your credentials
  1. After signing in successfully, use the below graph query and check the current Teams app settings.

GET

https://graph.microsoft.com/beta/teamwork/teamsAppSettings

You must go to the Modify permissions tab and click the Consent button next to TeamworkAppSettings.ReadWrite.All.

TeamworkAppSettings.ReadWrite.All Admin Consent
TeamworkAppSettings.ReadWrite.All Admin Consent

The screenshot below shows that the graph query execution is successful. You can check the output in the Response Preview tab. These are the current Teams app settings, including allowUserRequestForAppAccess, which is set to true. That means the user is allowed to send app requests to Teams.

Response Preview

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#teamwork/teamsAppSettings/$entity",
    "@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET teamwork/teamsAppSettings?$select=allowUserRequestsForAppAccess,isChatResourceSpecificConsentEnabled",
    "id": "9dcda47d-f87c-44dd-a9ee-2243d525559e",
    "allowUserRequestsForAppAccess": true,
    "isChatResourceSpecificConsentEnabled": true,
    "isUserPersonalScopeResourceSpecificConsentEnabled": true
}
allowUserRequestsForAppAccess: true
allowUserRequestsForAppAccess: true
  1. To hide all blocked apps in the Teams app store, add the code below to the Request body, select PATCH, and then click Run query.

Request body

{
    "@odata.type": "#microsoft.graph.teamsAppSettings",
    "allowUserRequestsForAppAccess": "false"
}
Change allowUserRequestsForAppAccess value to false
Change allowUserRequestsForAppAccess value to false
  1. Use the GET query once again to check and confirm if allowUserRequestsForAppAccess value has been changed to false.

GET

https://graph.microsoft.com/beta/teamwork/teamsAppSettings
Confirm allowUserRequestsForAppAccess is set to false
Confirm allowUserRequestsForAppAccess is set to false

End User Experience

After changing the value of allowUserRequestsForAppAccess to false, follow the below steps to test if the blocked apps are now hidden:

  1. Sign in to the Microsoft Teams App (Install app or Teams web client).
  2. Click on Apps on the left-hand side menu bar.
  3. When you browse or search for apps, you will notice that no apps are shown, and an error message will appear: We didn’t find any matches. This confirms that the blocked apps are hidden.
Test to confirm if all blocked apps are now hidden in Microsoft Teams
Test to confirm if all blocked apps are now hidden in Microsoft Teams

Method 2: Hide Blocked Apps in Teams using Powershell

The second method to hide apps in Microsoft Teams is by using Powershell. Let’s check the commands you execute to hide blocked apps in the Microsoft Teams App.

  1. Install Microsoft Graph Beta version.

Install Microsoft Graph Beta

Install-Module Microsoft.Graph.Beta -AllowClobber -Force
  1. Import Microsoft Graph Beta.

Import Microsoft Graph Beta

Import-module Microsoft.Graph.beta.teams
  1. Connect to Microsoft Graph with TeamworkAppSettings.ReadWrite.All scope permission.

Connect-MgGraph

Connect-MgGraph -Scopes TeamworkAppSettings.ReadWrite.All
Connect-MgGraph -Scopes TeamworkAppSettings.ReadWrite.All
Connect-MgGraph -Scopes TeamworkAppSettings.ReadWrite.All
  1. Check the current value of AllowUserRequestsForAppAccess.

Get-MgBetaTeamworkTeamAppSetting

Get-MgBetaTeamworkTeamAppSetting | fl AllowUserRequestsForAppAccess
Get-MgBetaTeamworkTeamAppSetting | fl AllowUserRequestsForAppAccess
Get-MgBetaTeamworkTeamAppSetting | fl AllowUserRequestsForAppAccess
  1. To change the value of AllowUserRequestsForAppAccess to false. We will create a variable called $appSettings and set the value of AllowUserRequestsForAppAccess to false.

Create $appSettings variable

PS>$appSettings = @{
	"@odata.type" = "#microsoft.graph.teamsAppSettings"
	AllowUserRequestsForAppAccess = "false"
}
  1. Check $appSettings variable value.

$appSettings

PS>$appsettings

Name                           Value
----                           -----
AllowUserRequestsForAppAccess  false
@odata.type                    #microsoft.graph.teamsAppSettings
$appSettings variable
$appSettings variable
  1. Set the AllowUserRequestsForAppAccess value to false to hide the blocked apps in Teams.

Update-MgbetaTeamworkTeamAppSetting

Update-MgbetaTeamworkTeamAppSetting -BodyParameter $appSettings
  1. Finally, check the value of AllowUserRequestsForAppAccess to confirm if it has been changed to false.
Get-MgBetaTeamworkTeamAppSetting | fl AllowUserRequestsForAppAccess
Update-MgbetaTeamworkTeamAppSetting -BodyParameter $appSettings
Update-MgbetaTeamworkTeamAppSetting -BodyParameter $appSettings

End User Experience

Whether you use Microsoft Graph or Powershell to hide blocked apps in MS Teams, the end user experience will be the same. Please follow the steps below to confirm if the blocked apps are now hidden.

  1. Sign in to the Microsoft Teams.
  2. Click on Apps on the menu bar on the left-hand side.
  3. When you browse or search for apps, you will notice that no apps are shown, and an error message will appear: We didn’t find any matches.
Blocked Apps are now hidden in MS Teams
Blocked Apps are now hidden in MS Teams

Unhide blocked Apps in Microsoft Teams

If you decide to unhide blocked apps and revert the change, change the value of AllowUserRequestsForAppAccess to false.

  1. Create $appSettings variable.

$appSettings

PS>$appSettings = @{
	"@odata.type" = "#microsoft.graph.teamsAppSettings"
	AllowUserRequestsForAppAccess = "false"
}
  1. Set the AllowUserRequestsForAppAccess value to true to unhide the blocked apps in Teams.

Update-MgbetaTeamworkTeamAppSetting

Update-MgbetaTeamworkTeamAppSetting -BodyParameter $appSettings

Leave a Comment