You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: concepts/auth-cloudsolutionprovider.md
+16-17Lines changed: 16 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ description: "This article describes how to enable application access to partner
4
4
author: koravvams
5
5
ms.localizationpriority: high
6
6
ms.subservice: "partner-customer-administration"
7
-
ms.custom: graphiamtop20, has-azure-ad-ps-ref
8
-
ms.date: 11/07/2024
7
+
ms.custom: graphiamtop20, no-azure-ad-ps-ref
8
+
ms.date: 02/19/2025
9
9
---
10
10
11
11
# Call Microsoft Graph from a Cloud Solution Provider application
@@ -16,17 +16,16 @@ This article describes how to enable application access to partner-managed custo
16
16
17
17
> [!IMPORTANT]
18
18
> Calling Microsoft Graph from a CSP application is only supported for directory resources (such as **user**, **group**,**device**, **organization**) and [Intune](/graph/api/resources/intune-graph-overview) resources.
19
-
>
20
19
21
20
## What is a partner-managed application
22
21
23
22
The CSP program enables Microsoft's partners to resell and manage Microsoft Online Services (such as Microsoft 365, Microsoft Azure, and CRM Online) to customers. Management of customer services is done through Delegated Admin Privileges, which enables designated partner users (known as agents) to access and configure their customers' environments.
24
23
25
24
Additionally, as a partner developer, you can build a **partner-managed app** to manage your customers' Microsoft services. Partner-managed apps are often called *preconsented* apps because all your customers are automatically preconsented for your partner-managed apps. This means when a user from one of your customer tenants uses one of your partner-managed apps, the user can use it without being prompted to give consent. Partner-managed apps also inherit Delegated Admin Privileges, so your partner agents can also get privileged access to your customers through your partner-managed application.
26
25
27
-
## How to set-up a partner-managed application
26
+
## How to setup a partner-managed application
28
27
29
-
An application is viewed as *partner-managed* when it is granted elevated permissions to access your customers' data.
28
+
An application is *partner-managed* when it has elevated permissions to access customer data.
30
29
31
30
> **Note:** Partner-managed apps can *only* be configured on Partner tenants, and in order to manage customer tenant resources, partner-managed apps **must** be configured as **multi-tenant applications**.
32
31
@@ -39,34 +38,32 @@ The initial steps required here follow most of the same steps used to register a
39
38
40
39
### Preconsent your app for all your customers
41
40
42
-
Finally grant your partner-managed app those configured permissions for all your customers. You can do this by adding the **servicePrincipal** that represents the app to the *Adminagents* group in your Partner tenant, using [Azure AD PowerShell V2](https://www.powershellgallery.com/packages/AzureAD) or [Microsoft Graph PowerShell](/powershell/microsoftgraph/installation). Follow these steps to find the *Adminagents* group, the **servicePrincipal** and add it to the group.
41
+
Finally grant your partner-managed app those configured permissions for all your customers. You can do this by adding the **servicePrincipal** that represents the app to the *Adminagents* group in your Partner tenant, using [Microsoft Entra PowerShell](/powershell/entra-powershell/installation) or [Microsoft Graph PowerShell](/powershell/microsoftgraph/installation). Follow these steps to find the *Adminagents* group, the **servicePrincipal** and add it to the group.
43
42
44
-
[!INCLUDE [Azure AD PowerShell deprecation note](~/../reusable-content/msgraph-powershell/includes/aad-powershell-deprecation-note.md)]
45
-
46
-
# [Azure AD PowerShell](#tab/azuread)
43
+
# [Microsoft Entra PowerShell](#tab/entraps)
47
44
48
45
1. Open a PowerShell session and connect to your partner tenant by entering your admin credentials into the sign-in window.
49
46
50
47
```PowerShell
51
-
Connect-AzureAd
48
+
Connect-Entra
52
49
```
53
50
54
51
2. Find the group that represents the *Adminagents*.
@@ -128,15 +126,16 @@ This is a standard [authorization code grant flow](/azure/active-directory/devel
128
126
```
129
127
130
128
## Register your app in the regions you support
129
+
131
130
<a name="region"></a>
132
131
133
-
CSP customer engagement is currently limited to a single region. Partner-managed applications carry the same limitation. This means you must have a separate tenant for each region you sell in. For example, if your partner-managed app is registered in a tenant in the US but your customer is in the EU – the partner-managed app will not work. Each of your regional partner tenants must maintain their own set of partner-managed apps to manage customers within the same region. This might require additional logic in your app (prior to sign-in) to get your customers' sign-in username to decide which region-specific partner-managed app identity to use, to serve the user.
132
+
CSP customer engagement is currently limited to a single region. Partner-managed applications carry the same limitation. This means you must have a separate tenant for each region you sell in. For example, if your partner-managed app is registered in a tenant in the US but your customer is in the EU, the partner-managed app doesn't work. Each of your regional partner tenants must maintain their own set of partner-managed apps to manage customers within the same region. This might require additional logic in your app (prior to sign-in) to get your customers' sign-in username to decide which region-specific partner-managed app identity to use, to serve the user.
134
133
135
134
## Calling Microsoft Graph immediately after customer creation
136
135
137
-
When you create a new customer using the [Partner Center API](/partner-center/developer/create-a-customer), a new customer tenant gets created. Additionally, a partner relationship also gets created, which makes you the partner of record for this new customer tenant. This partner relationship can take up to 3 minutes to propagate to the new customer tenant. If your app calls Microsoft Graph straight after creation, your app will likely receive an access denied error. A similar delay may be experienced when an existing customer accepts your invitation. This is because preconsent relies on the partner relationship being present in the customer tenant.
136
+
When you create a new customer using the [Partner Center API](/partner-center/developer/create-a-customer), a new customer tenant gets created. Additionally, a partner relationship also gets created, which makes you the partner of record for this new customer tenant. This partner relationship can take up to three minutes to propagate to the new customer tenant. If your app calls Microsoft Graph straight after creation, your app will likely receive an access denied error. A similar delay might be experienced when an existing customer accepts your invitation. This is because preconsent relies on the partner relationship being present in the customer tenant.
138
137
139
-
To avoid this problem, we recommend that your partner app should wait **three minutes** after customer creation before calling Microsoft Entra ID to acquire a token (to call Microsoft Graph). This should cover most cases.
138
+
To avoid this problem, we recommend that your partner app should wait **three minutes** after customer creation before calling Microsoft Entra ID to acquire a token (to call Microsoft Graph). This should cover most cases.
140
139
However, if after waiting three minutes you still receive an authorization error, please wait an extra 60 seconds and try again.
141
140
142
-
> **Note:** On the retry, you must acquire a new access token from Microsoft Entra ID, before calling Microsoft Graph. Calling Microsoft Graph with the access token you already have will not work, because the access token is good for an hour and won't contain the pre-consented permission claims.
141
+
> **Note:** On the retry, you must acquire a new access token from Microsoft Entra ID, before calling Microsoft Graph. Calling Microsoft Graph with the access token you already have doesn't work, because the access token is good for an hour and doesn't contain the pre-consented permission claims.
0 commit comments