Skip to content

Commit 6855d26

Browse files
Merge pull request #208169 from omondiatieno/hide-app-updates
add microsoft graph PowerShell cmdlets and API queries
2 parents e3c2999 + c56914a commit 6855d26

File tree

1 file changed

+58
-3
lines changed

1 file changed

+58
-3
lines changed

articles/active-directory/manage-apps/hide-application-from-user-portal.md

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ ms.service: active-directory
88
ms.subservice: app-mgmt
99
ms.workload: identity
1010
ms.topic: how-to
11-
ms.date: 07/21/2022
11+
ms.date: 08/17/2022
1212
ms.author: lenalepa
1313
ms.reviewer: ergreenl
1414
ms.collection: M365-identity-device-management
15+
zone_pivot_groups: enterprise-apps-all
16+
1517
#customer intent: As an admin, I want to hide an enterprise application from user's experience so that it is not listed in the user's Active directory access portals or Microsoft 365 launchers
1618
---
1719

@@ -27,6 +29,8 @@ Learn how to hide enterprise applications in Azure Active Directory. When an app
2729

2830
## Hide an application from the end user
2931

32+
:::zone pivot="portal"
33+
3034
Use the following steps to hide an application from My Apps portal and Microsoft 365 application launcher.
3135

3236
1. Sign in to the [Azure portal](https://portal.azure.com) as the global administrator for your directory.
@@ -38,12 +42,15 @@ Use the following steps to hide an application from My Apps portal and Microsoft
3842
1. Select **No** for the **Visible to users?** question.
3943
1. Select **Save**.
4044

45+
:::zone-end
46+
4147
> [!NOTE]
4248
> These instructions apply only to Enterprise applications.
4349
44-
## Use Azure AD PowerShell to hide an application
50+
:::zone pivot="aad-powershell"
4551

46-
To hide an application from the My Apps portal, you can manually add the HideApp tag to the service principal for the application. Run the following [AzureAD PowerShell](/powershell/module/azuread/#service_principals) commands to set the application's **Visible to Users?** property to **No**.
52+
53+
To hide an application from the My Apps portal, you can manually add the HideApp tag to the service principal for the application. Run the following AzureAD PowerShell commands to set the application's **Visible to Users?** property to **No**.
4754

4855
```PowerShell
4956
Connect-AzureAD
@@ -54,6 +61,53 @@ $tags = $servicePrincipal.tags
5461
$tags += "HideApp"
5562
Set-AzureADServicePrincipal -ObjectId $objectId -Tags $tags
5663
```
64+
:::zone-end
65+
66+
:::zone pivot="ms-powershell"
67+
68+
To hide an application from the My Apps portal, you can manually add the HideApp tag to the service principal for the application. Run the following Microsoft Graph PowerShell commands to set the application's **Visible to Users?** property to **No**.
69+
70+
```PowerShell
71+
Connect-MgGraph
72+
73+
$servicePrincipal = Get-MgServicePrincipal -ServicePrincipalId $objectId
74+
$tags = $servicePrincipal.tags
75+
$tags += "HideApp"
76+
Update-MgServicePrincipal -ServicePrincipalID $objectId -Tags $tags
77+
```
78+
:::zone-end
79+
80+
:::zone pivot="ms-graph"
81+
82+
To hide an enterprise application using [Graph Explorer](https://developer.microsoft.com/graph/graph-explorer), run the following queries.
83+
84+
1. Get the application you want to hide.
85+
86+
```http
87+
GET https://graph.microsoft.com/v1.0/servicePrincipals/5f214ccd-3f74-41d7-b683-9a6d845eea4d
88+
```
89+
1. Update the application to hide it from users.
90+
91+
```http
92+
PATCH https://graph.microsoft.com/v1.0/servicePrincipals/5f214ccd-3f74-41d7-b683-9a6d845eea4d/
93+
```
94+
95+
Supply the following request body.
96+
97+
```json
98+
{
99+
"tags": [
100+
"HideApp"
101+
]
102+
}
103+
```
104+
105+
>[!WARNING]
106+
>If the application has other tags, you must include them in the request body. Otherwise, the query will overwrite them.
107+
108+
:::zone-end
109+
110+
:::zone pivot="portal"
57111

58112
## Hide Microsoft 365 applications from the My Apps portal
59113

@@ -66,6 +120,7 @@ Use the following steps to hide all Microsoft 365 applications from the My Apps
66120
1. For **Users can only see Office 365 apps in the Office 365 portal**, select **Yes**.
67121
1. Select **Save**.
68122

123+
:::zone-end
69124
## Next steps
70125

71126
- [Remove a user or group assignment from an enterprise app](./assign-user-or-group-access-portal.md)

0 commit comments

Comments
 (0)