---
title: "POST /api/v1/azure/sync-users-from-azure-tenants"
method: POST
path: "/api/v1/azure/sync-users-from-azure-tenants"
tags: ["Azure"]
---

# POST /api/v1/azure/sync-users-from-azure-tenants

`POST /api/v1/azure/sync-users-from-azure-tenants`

## Request

- Base URL: `https://api.immy.bot` (the document declares no server; this is the origin it was published from)
- URL: `https://api.immy.bot/api/v1/azure/sync-users-from-azure-tenants`
- Auth: none declared

## Request body

- SyncAzureDataForTenantsRequest
  - `tenantPrincipalIds` string[], nullable
  - `allPartnerTenants` boolean

## Response `200`

OK

- AzureTenantUserSyncResult[]
  - `principalId` string, nullable
  - `wasSuccessful` boolean
  - `failedReason` AzureError
    - `message` string, nullable
    - `oDataError` ODataErrorDetails
      - `code` string, nullable
      - `date` string, date-time, nullable
      - `requestId` string, nullable
      - `clientRequestId` string, nullable
      - `odataType` string, nullable
    - `msalError` MsalErrorDetails
      - `error` string, nullable
      - `errorDescription` string, nullable
      - `errorCodes` integer[], nullable
      - `timestamp` string, nullable
      - `traceId` string, nullable
      - `correlationId` string, nullable
    - `missingAccessToken` MissingAccessTokenDetails
      - `tenantId` string, nullable
      - `requiredScopes` string, nullable
    - `apiResponseContent` ApiResponseErrorContent
      - `httpMethod` string, nullable
      - `uri` string, nullable
      - `statusCode` integer
      - `content` string, nullable
    - `partnerCenterApiResponseDetails` ApiResponseErrorContent
      - `httpMethod` string, nullable
      - `uri` string, nullable
      - `statusCode` integer
      - `content` string, nullable
    - `oauthAccessTokenErrorResponse` Oauth2AccessTokenErrorResponse
      - `error` string, nullable
      - `errorDescription` string, nullable
      - `errorCodes` integer[], nullable
      - `timestamp` string, nullable
      - `traceId` string, nullable
      - `correlationId` string, nullable
    - `credentialDetails` AzureTenantTokenCredentialDetails
      - `tenantPrincipalId` string, nullable
      - `partnerPrincipalId` string, nullable
      - `gotAccessTokenFrom` 'Obo' | 'DefaultAppRegistration' | 'CustomAppRegistration' | 'OboPartnerCenter': The string or integer value may be used. Obo = 1, DefaultAppRegistration = 2, CustomAppRegistration = 3, OboPartnerCenter = 4
      - `resolvedClientId` string, nullable
      - `onlyUsePartnerCenterRefresh` boolean
      - `tenantPreferredAzureClientId` string, nullable
      - `tenantAzurePermissionLevel` 'DefaultAppRegistration' | 'CustomAppRegistration': The string or integer value may be used. DefaultAppRegistration = 1, CustomAppRegistration = 3
    - `formattedErrorMessage` string, nullable
  - `numUsersSynced` integer
  - `immyTenantsSyncedUsers` object, nullable

---

[API](https://skmtc.dev/immy/apis/immy-bot-api-2.md) · [All operations](https://skmtc.dev/immy/apis/immy-bot-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/immy/apis/immy-bot-api-2/revisions/75b50268fa51?raw)
