Skip to content

Commit a59140e

Browse files
Merge pull request #234561 from rolyon/rolyon-mto-sync-graph-troubleshooting
[Azure AD MTO] Create and Update request troubleshooting
2 parents df0444a + 0890d77 commit a59140e

File tree

1 file changed

+55
-1
lines changed

1 file changed

+55
-1
lines changed

articles/active-directory/multi-tenant-organizations/cross-tenant-synchronization-configure-graph.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.service: active-directory
88
ms.workload: identity
99
ms.subservice: multi-tenant-organizations
1010
ms.topic: how-to
11-
ms.date: 03/08/2023
11+
ms.date: 04/15/2023
1212
ms.author: rolyon
1313
ms.custom: it-pro
1414

@@ -84,6 +84,8 @@ These steps describe how to use Microsoft Graph Explorer (recommended), but you
8484

8585
1. In the target tenant, use the [Create crossTenantAccessPolicyConfigurationPartner](/graph/api/crosstenantaccesspolicy-post-partners?view=graph-rest-beta&preserve-view=true) API to create a new partner configuration in a cross-tenant access policy between the target tenant and the source tenant. Use the source tenant ID in the request.
8686

87+
If you get an `Request_MultipleObjectsWithSameKeyValue` error, you might already have an existing configuration. For more information, see [Symptom - Request_MultipleObjectsWithSameKeyValue error](#symptom---request_multipleobjectswithsamekeyvalue-error).
88+
8789
**Request**
8890

8991
```http
@@ -126,6 +128,8 @@ These steps describe how to use Microsoft Graph Explorer (recommended), but you
126128
127129
1. Use the [Create identitySynchronization](/graph/api/crosstenantaccesspolicyconfigurationpartner-put-identitysynchronization?view=graph-rest-beta&preserve-view=true) API to enable user synchronization in the target tenant.
128130
131+
If you get an `Request_MultipleObjectsWithSameKeyValue` error, you might already have an existing policy. For more information, see [Symptom - Request_MultipleObjectsWithSameKeyValue error](#symptom---request_multipleobjectswithsamekeyvalue-error).
132+
129133
**Request**
130134
131135
```http
@@ -180,6 +184,8 @@ These steps describe how to use Microsoft Graph Explorer (recommended), but you
180184
181185
1. In the source tenant, use the [Create crossTenantAccessPolicyConfigurationPartner](/graph/api/crosstenantaccesspolicy-post-partners?view=graph-rest-beta&preserve-view=true) API to create a new partner configuration in a cross-tenant access policy between the source tenant and the target tenant. Use the target tenant ID in the request.
182186
187+
If you get an `Request_MultipleObjectsWithSameKeyValue` error, you might already have an existing configuration. For more information, see [Symptom - Request_MultipleObjectsWithSameKeyValue error](#symptom---request_multipleobjectswithsamekeyvalue-error).
188+
183189
**Request**
184190
185191
```http
@@ -757,6 +763,54 @@ Either the signed-in user doesn't have sufficient privileges, or you need to con
757763
758764
2. In [Microsoft Graph Explorer tool](https://aka.ms/ge), make sure you consent to the required permissions. See [Step 1: Sign in to tenants and consent to permissions](#step-1-sign-in-to-tenants-and-consent-to-permissions) earlier in this article.
759765
766+
#### Symptom - Request_MultipleObjectsWithSameKeyValue error
767+
768+
When you try to make a Graph API call, you receive an error message similar to the following:
769+
770+
```
771+
code: Request_MultipleObjectsWithSameKeyValue
772+
message: Another object with the same value for property tenantId already exists.
773+
message: A conflicting object with one or more of the specified property values is present in the directory.
774+
```
775+
776+
**Cause**
777+
778+
You are likely trying to create a configuration or object that already exists, possibly from a previous configuration.
779+
780+
**Solution**
781+
782+
1. Verify your request syntax and that you are using the correct tenant ID.
783+
784+
1. Make a `GET` request to list the existing object.
785+
786+
1. If you have an existing object, instead of making a create request using `POST` or `PUT`, you might need to make an update request using `PATCH`, such as:
787+
788+
- [Update crossTenantAccessPolicyConfigurationPartner](/graph/api/crosstenantaccesspolicyconfigurationpartner-update?view=graph-rest-beta&preserve-view=true)
789+
- [Update crossTenantIdentitySyncPolicyPartner](/graph/api/crosstenantidentitysyncpolicypartner-update?view=graph-rest-beta&preserve-view=true)
790+
791+
#### Symptom - Directory_ObjectNotFound error
792+
793+
When you try to make a Graph API call, you receive an error message similar to the following:
794+
795+
```
796+
code: Directory_ObjectNotFound
797+
message: Unable to read the company information from the directory.
798+
```
799+
800+
**Cause**
801+
802+
You are likely trying to update an object that doesn't exist using `PATCH`.
803+
804+
**Solution**
805+
806+
1. Verify your request syntax and that you are using the correct tenant ID.
807+
808+
1. Make a `GET` request to verify the object doesn't exist.
809+
810+
1. If object doesn't exist, instead of making an update request using `PATCH`, you might need to make a create request using `POST` or `PUT`, such as:
811+
812+
- [Create identitySynchronization](/graph/api/crosstenantaccesspolicyconfigurationpartner-put-identitysynchronization?view=graph-rest-beta&preserve-view=true)
813+
760814
## Next steps
761815
762816
- [Azure AD synchronization API overview](/graph/api/resources/synchronization-overview?view=graph-rest-beta&preserve-view=true)

0 commit comments

Comments
 (0)