Skip to content

Commit f9d0c2f

Browse files
authored
Merge pull request #224396 from FaithOmbongi/docs-editor/create-service-principal-cross-1674143177
Update Microsoft Graph example - create SP
2 parents 1ff8c1e + 0023aab commit f9d0c2f

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

articles/active-directory/manage-apps/create-service-principal-cross-tenant.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ In this article, you'll learn how to create an enterprise application in your te
2424

2525
Before you proceed to add the application using any of these options, check whether the enterprise application is already in your tenant by attempting to sign in to the application. If the sign-in is successful, the enterprise application already exists in your tenant.
2626

27-
If you have verified that the application isn't in your tenant, proceed with any of the following ways to add the enterprise application to your tenant using the appId
27+
If you have verified that the application isn't in your tenant, proceed with any of the following ways to add the enterprise application to your tenant.
2828

2929
## Prerequisites
3030

3131
To add an enterprise application to your Azure AD tenant, you need:
3232

3333
- An Azure AD user account. If you don't already have one, you can [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
3434
- One of the following roles: Global Administrator, Cloud Application Administrator, or Application Administrator.
35-
- The client ID of the multi-tenant application.
35+
- The client ID (also called appId in Microsoft Graph) of the multi-tenant application.
3636

3737

3838
## Create an enterprise application
@@ -67,24 +67,26 @@ where:
6767
:::zone-end
6868
:::zone pivot="ms-graph"
6969

70-
From the Microsoft Graph explorer window:
70+
You can use an API client such as [Graph Explorer](https://aka.ms/ge) to work with Microsoft Graph.
7171

72-
1. To create the enterprise application, insert the following query:
72+
1. Grant the client app the *Application.ReadWrite.All* permission.
73+
74+
1. To create the enterprise application, run the following query. The appId is the client ID of the application.
7375

7476
```http
75-
POST /servicePrincipals.
76-
```
77-
1. Supply the following request in the **Request body**.
78-
77+
POST https://graph.microsoft.com/v1.0/servicePrincipals
78+
Content-type: application/json
79+
7980
{
8081
"appId": "fc876dd1-6bcb-4304-b9b6-18ddf1526b62"
8182
}
82-
1. Grant the Application.ReadWrite.All permission under the **Modify permissions** tab and select **Run query**.
83+
84+
```
8385

84-
1. To delete the enterprise application you created, run the query:
86+
1. To delete the enterprise application you created, run the query.
8587

8688
```http
87-
DELETE /servicePrincipals/{objectID}
89+
DELETE https://graph.microsoft.com/v1.0/servicePrincipals(appId='fc876dd1-6bcb-4304-b9b6-18ddf1526b62')
8890
```
8991
:::zone-end
9092
:::zone pivot="azure-cli"

0 commit comments

Comments
 (0)