Skip to content

Commit e630a2e

Browse files
committed
assign owners with Microsoft Graph
1 parent 731bc4c commit e630a2e

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

articles/active-directory/manage-apps/assign-app-owners.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,23 @@ ms.service: active-directory
99
ms.workload: identity
1010
ms.subservice: app-mgmt
1111
ms.topic: how-to
12-
ms.date: 12/05/2022
12+
ms.date: 01/26/2023
1313
ms.author: jomondi
1414
ms.reviewer: saibandaru
15+
zone_pivot_groups: enterprise-apps-minus-aad-powershell
16+
1517
#Customer intent: As an Azure AD administrator, I want to assign owners to enterprise applications.
1618

1719
---
1820

1921
# Assign enterprise application owners
2022

21-
As an [owner of an enterprise application](overview-assign-app-owners.md) in Azure Active Directory (Azure AD), a user can manage the organization-specific configuration of it, such as single sign-on, provisioning, and user assignments. An owner can also add or remove other owners. Unlike Global Administrators, owners can manage only the enterprise applications they own. In this article, you learn how to assign an owner of an application.
23+
An [owner of an enterprise application](overview-assign-app-owners.md) in Azure Active Directory (Azure AD) can manage the organization-specific configuration of the application, such as single sign-on, provisioning, and user assignments. An owner can also add or remove other owners. Unlike Global Administrators, owners can manage only the enterprise applications they own. In this article, you learn how to assign an owner of an application.
2224

2325
## Assign an owner
2426

27+
:::zone pivot="portal"
28+
2529
To assign an owner to an enterprise application:
2630

2731
1. Sign in to [your Azure AD organization](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Overview) with an account that is eligible for the **Application Administrator** role or the **Cloud Application Administrator** role for the organization.
@@ -30,6 +34,47 @@ To assign an owner to an enterprise application:
3034
4. Search for and select the user account that you want to be an owner of the application.
3135
5. Click **Select** to add the user account that you chose as an owner of the application.
3236

37+
:::zone-end
38+
39+
:::zone pivot="ms-powershell"
40+
41+
Use the following Microsoft Graph PowerShell cmdlet to add an owner to an enterprise application.
42+
43+
You'll need to consent to the `Application.ReadWrite.All` permission.
44+
45+
In the following example, the user's object ID is 8afc02cb-4d62-4dba-b536-9f6d73e9be26 and the applicationId is 46e6adf4-a9cf-4b60-9390-0ba6fb00bf6b.
46+
47+
```powershell
48+
Import-Module Microsoft.Graph.Applications
49+
50+
$params = @{
51+
"@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/8afc02cb-4d62-4dba-b536-9f6d73e9be26"
52+
}
53+
54+
New-MgServicePrincipalOwnerByRef -ServicePrincipalId '46e6adf4-a9cf-4b60-9390-0ba6fb00bf6b' -BodyParameter $params
55+
```
56+
:::zone-end
57+
58+
:::zone pivot="ms-graph"
59+
60+
To assign an owner to an application, sign in to [Graph Explorer](https://developer.microsoft.com/graph/graph-explorer) with one of the roles listed in the prerequisite section.
61+
62+
You'll need to consent to the `Application.ReadWrite.All` permission.
63+
64+
Run the following Microsoft Graph query to assign an owner to an application. You need the object ID of the user you want to assign the application to. In the following example, the user's object ID is 8afc02cb-4d62-4dba-b536-9f6d73e9be26 and the appId is 46e6adf4-a9cf-4b60-9390-0ba6fb00bf6b.
65+
66+
```http
67+
POST https://graph.microsoft.com/v1.0/servicePrincipals(appId='46e6adf4-a9cf-4b60-9390-0ba6fb00bf6b')/owners/$ref
68+
Content-Type: application/json
69+
70+
{
71+
"@odata.id": "https://graph.microsoft.com/v1.0/directoryObjects/8afc02cb-4d62-4dba-b536-9f6d73e9be26"
72+
}
73+
```
74+
75+
:::zone-end
76+
77+
3378
> [!NOTE]
3479
> If the user setting **Restrict access to Azure AD administration portal** is set to `Yes`, non-admin users will not be able to use the Azure portal to manage the applications they own. For more information about the actions that can be performed on owned enterprise applications, see [Owned enterprise applications](../fundamentals/users-default-permissions.md#owned-enterprise-applications).
3580

0 commit comments

Comments
 (0)