Organization connections
9 operations
List organization connections
/v1/org-connectionsworkwae.orgConnections.list()Errors
It answers only the errors every operation can answer. Each error's reason is the body's code.
Responses
Register an organization connection
/v1/org-connectionsworkwae.orgConnections.create()Google: the service account key is checked and sealed; authorize the returned clientId for the returned scopes in the Admin console, then test. Microsoft: a platform connection starts in pending_consent (POST .../consent); a tenant app with a directoryId starts unverified.
Errors
| Status | Reason | When |
|---|---|---|
| 400 | invalid_service_account_key | serviceAccountKey is not a usable Google service account key. |
| 400 | invalid_certificate | The certificate or private key is not a usable PEM certificate and unencrypted PKCS#8 RSA key. |
| 400 | directory_id_not_allowed | A directoryId is given for a platform connection. |
| 400 | provider_not_configured | A platform connection names a cloud the platform has no app for. |
It can also answer the errors every operation can answer. Each error's reason is the body's code.
Parameters
| Name | In | Schema |
|---|---|---|
| Idempotency-Key | header | Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request. string length 1 to 255 |
Request body
requiredResponses
Get an organization connection
/v1/org-connections/{connectionId}workwae.orgConnections.get()Errors
| Status | Reason | When |
|---|---|---|
| 404 | org_connection_not_found | The organization connection does not exist. |
It can also answer the errors every operation can answer. Each error's reason is the body's code.
Parameters
| Name | In | Schema |
|---|---|---|
| connectionIdrequired | path | string (uuid) |
Responses
Delete an organization connection
/v1/org-connections/{connectionId}workwae.orgConnections.delete()Errors
| Status | Reason | When |
|---|---|---|
| 404 | org_connection_not_found | The organization connection does not exist. |
| 409 | connection_in_use | Live accounts still authenticate through the connection. |
It can also answer the errors every operation can answer. Each error's reason is the body's code.
Parameters
| Name | In | Schema |
|---|---|---|
| connectionIdrequired | path | string (uuid) |
Responses
Update an organization connection
/v1/org-connections/{connectionId}workwae.orgConnections.update()Replacing a credential or the authorized scopes makes the connection unverified until the next test.
Errors
| Status | Reason | When |
|---|---|---|
| 400 | invalid_service_account_key | serviceAccountKey is not a usable Google service account key. |
| 400 | invalid_certificate | The certificate or private key is not a usable PEM certificate and unencrypted PKCS#8 RSA key. |
| 400 | directory_id_not_allowed | A directoryId is given for a platform connection. |
| 400 | credential_mismatch | A field does not apply to this connection's kind or credential type, or a certificate is replaced without its private key. |
| 404 | org_connection_not_found | The organization connection does not exist. |
It can also answer the errors every operation can answer. Each error's reason is the body's code.
Parameters
| Name | In | Schema |
|---|---|---|
| connectionIdrequired | path | string (uuid) |
Request body
Responses
Start Microsoft admin consent
/v1/org-connections/{connectionId}/consentworkwae.orgConnections.consent()Returns the URL an administrator of the directory grants consent at. Afterwards the browser returns to redirectUri with status=success|error, connection_id, error and state; the connection records the consenting directory and is tested. A tenant app uses /adminconsent. The platform app is consented through a sign-in (authorize with prompt=admin_consent) and records the directory named by the sign-in's ID token; it can only be started from the board, and the board user who started it has to be signed in, in the browser that returns, for the directory to be recorded. Errors on return include access_denied, consent_failed, consent_unverified, directory_mismatch and directory_already_connected (another platform connection holds the directory).
Errors
| Status | Reason | When |
|---|---|---|
| 400 | not_microsoft | The connection is a Google connection. |
| 400 | redirect_uri_not_allowed | redirectUri is neither on the tenant allowlist (settings.redirectUris) nor the board. |
| 400 | provider_not_configured | A platform connection's cloud has no platform app (the platform's configuration changed). |
| 403 | session_required | A platform connection's consent is started by a caller that is not a board session. |
| 404 | org_connection_not_found | The organization connection does not exist. |
It can also answer the errors every operation can answer. Each error's reason is the body's code.
Parameters
| Name | In | Schema |
|---|---|---|
| connectionIdrequired | path | string (uuid) |
| Idempotency-Key | header | Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request. string length 1 to 255 |
Request body
requiredResponses
Test an organization connection
/v1/org-connections/{connectionId}/testworkwae.orgConnections.test()Requests a token the way accounts will and reports each check; the connection becomes active or failing. A passing test returns accounts that were moved to reauth_required to active. Google impersonates user (default: the directory admin).
Errors
| Status | Reason | When |
|---|---|---|
| 400 | user_required | A Google connection has neither a user nor a directory admin to test as. |
| 404 | org_connection_not_found | The organization connection does not exist. |
| 409 | consent_required | No Microsoft directory has consented to the app yet. |
It can also answer the errors every operation can answer. Each error's reason is the body's code.
Parameters
| Name | In | Schema |
|---|---|---|
| connectionIdrequired | path | string (uuid) |
| Idempotency-Key | header | Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request. string length 1 to 255 |
Request body
Responses
List the directory's mailboxes
/v1/org-connections/{connectionId}/directory-entriesworkwae.orgConnections.directoryEntries()Microsoft: Graph /users (needs User.Read.All). Google: the Admin SDK users.list as the directory admin (needs admin.directory.user.readonly). query matches the start of names and addresses. A nextCursor is good for an hour, on this connection only.
Errors
| Status | Reason | When |
|---|---|---|
| 400 | invalid_cursor | The cursor is not one this list issued. |
| 400 | provider_rejected | The provider rejected the listing (e.g. the query). |
| 404 | org_connection_not_found | The organization connection does not exist. |
| 404 | provider_not_found | The provider no longer has the directory. |
| 409 | consent_required | No Microsoft directory has consented to the app yet. |
| 409 | directory_unavailable | The connection may not list the directory: there is no directory admin, the permission or scope is not granted, or the connection cannot get a token (test it). |
| 429 | provider_throttled | The provider asked us to slow down (with Retry-After when it named a wait). |
| 502 | provider_unavailable | The provider could not be reached (with Retry-After when it named a wait). |
It can also answer the errors every operation can answer. Each error's reason is the body's code.
Parameters
| Name | In | Schema |
|---|---|---|
| connectionIdrequired | path | string (uuid) |
| cursor | query | string length 1 to 512 |
| limit | query | integer Default 1001 to 200 |
| query | query | string max length 100 |
Responses
Add mailboxes as accounts
/v1/org-connections/{connectionId}/accountsworkwae.orgConnections.addAccounts()Each mailbox is checked through the connection before its account is created (Google: a delegated token for it; Microsoft: its inbox). items holds one result per mailbox, in request order. Per-mailbox failures are reported there with the reason the API would answer with, e.g. invalid_grant (no such user), consent_revoked (the scopes or permissions are not granted), provider_forbidden or provider_not_found (no mailbox access), plan_limit_accounts (the plan's account limit was reached part way through; the mailboxes before it are created).
Errors
| Status | Reason | When |
|---|---|---|
| 400 | storage_unavailable | settings.bodyStorage is cache or full and no object store is configured. |
| 402 | billing_past_due | The tenant's payment is past due beyond the grace period (sends already queued or scheduled still go out). |
| 403 | plan_limit_storage | settings.bodyStorage is cache or full and the tenant's plan does not include body storage. |
| 404 | org_connection_not_found | The organization connection does not exist. |
| 409 | consent_required | No Microsoft directory has consented to the app yet. |
It can also answer the errors every operation can answer. Each error's reason is the body's code.
Parameters
| Name | In | Schema |
|---|---|---|
| connectionIdrequired | path | string (uuid) |
| Idempotency-Key | header | Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request. string length 1 to 255 |