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.
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.
Contents
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.
- Launch the Graph Explorer web page and Sign in using administrator rights.
- 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.
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
}
- 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"
}
- Use the GET query once again to check and confirm if
allowUserRequestsForAppAccess
value has been changed tofalse
.
GET
https://graph.microsoft.com/beta/teamwork/teamsAppSettings
End User Experience
After changing the value of allowUserRequestsForAppAccess to false, follow the below steps to test if the blocked apps are now hidden:
- Sign in to the Microsoft Teams App (Install app or Teams web client).
- Click on Apps on the left-hand side menu bar.
- 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.
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.
- Install Microsoft Graph Beta PowerShell module.
Install Microsoft Graph PowerShell module
Install-Module Microsoft.Graph.Beta -AllowClobber -Force
- Import Microsoft Graph Beta PowerShell module.
Import Microsoft Graph Beta
Import-module Microsoft.Graph.beta.teams
- Connect to Microsoft Graph with TeamworkAppSettings.ReadWrite.All scope permission.
Connect-MgGraph
Connect-MgGraph -Scopes TeamworkAppSettings.ReadWrite.All
- Check the current value of AllowUserRequestsForAppAccess.
Get-MgBetaTeamworkTeamAppSetting
Get-MgBetaTeamworkTeamAppSetting | fl AllowUserRequestsForAppAccess
- 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"
}
- Check
$appSettings
variable value.
$appSettings
PS>$appsettings
Name Value
---- -----
AllowUserRequestsForAppAccess false
@odata.type #microsoft.graph.teamsAppSettings
- Set the AllowUserRequestsForAppAccess value to false to hide the blocked apps in Teams.
Update-MgbetaTeamworkTeamAppSetting
Update-MgbetaTeamworkTeamAppSetting -BodyParameter $appSettings
- Finally, check the value of AllowUserRequestsForAppAccess to confirm if it has been changed to false.
Get-MgBetaTeamworkTeamAppSetting | fl AllowUserRequestsForAppAccess
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.
- Sign in to the Microsoft Teams.
- Click on Apps on the menu bar on the left-hand side.
- 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.
Unhide blocked Apps in Microsoft Teams
If you decide to unhide blocked apps and revert the change, change the value of AllowUserRequestsForAppAccess to false.
- Create $appSettings variable.
$appSettings
PS>$appSettings = @{
"@odata.type" = "#microsoft.graph.teamsAppSettings"
AllowUserRequestsForAppAccess = "false"
}
- Set the AllowUserRequestsForAppAccess value to true to unhide the blocked apps in Teams.
Update-MgbetaTeamworkTeamAppSetting
Update-MgbetaTeamworkTeamAppSetting -BodyParameter $appSettings