Setup links for directory sync
The Setup link is used to create a shareable link that can be used to create a Directory Sync connection without access to the Admin Portal. The link gives its holder the directory's SCIM endpoint and token, which their Identity Provider needs to sync users and groups, so share it only with the person who configures that Identity Provider. Let's go through the steps to create a new Setup link.
Create Setup link
You can create a new setup link for Directory Sync from the Connections page using New Setup Link button

Another way is to go to the Setup Links section under Directory Sync menu and Click on Create New/New Setup Link button

The create Setup Link for Directory Sync page looks like below

Once the link is created you can see the the link info section at the bottom

You can copy the link by clicking on the Copy button

Regenerate link
You can regenerate the link by clicking on Regenerate button

Once you confirm Regenerate action you will see the new setup link in the link info section

Regenerating issues a new URL and invalidates the previous one straight away. Share the new link with whoever is setting up the connection: a URL copied from the link info section earlier no longer opens the setup page.
Setup links expire, three days after creation by default. Creating a setup link for a tenant and product whose link has already expired renews it, and renewal behaves like regenerating — you get a new URL, and the expired one stays invalid.
The same applies to the /api/v1/dsync/setuplinks endpoint: it returns the current link unchanged while that link is still valid,
and issues a new URL when you pass regenerate: true or when the existing link has expired.
Requests to POST /api/v1/dsync/setuplinks for the same tenant and product that arrive at the same time, whether they create,
renew or regenerate the link, issue one link, and every request receives that link. A request that cannot read the link another
request is issuing yet is rejected with a 409; retry it to receive the link.
To read or delete a link through /api/v1/dsync/setuplinks, pass its id, or the tenant and product it was created for. A
request with neither is rejected with a 400, and so is a GET /api/v1/dsync/setuplinks/product request without a product.
Actions from setup link list page
You can perform ACTIONS like Copy, View, Regenerate & Delete from this page

Setup link page
When you open the setup link you will see the following

Create Directory Sync connection
You can open create Directory Sync by clicking on New Directory button & filling the correct details

After creation of the directory sync you will see the info section

What the setup link can reach
The person holding the link chooses only the directory type. The name, tenant, product and webhook come from the setup link. They see the directory's name, type and status, the SCIM endpoint and token to configure their Identity Provider with, and whether Google Workspace authorization is complete. They do not see the webhook. They can turn the directory on or off and delete it, and change nothing else.
A setup link reaches only the directories of its own tenant and product. Opening a directory of another tenant or product fails
with a 400 and Tenant/Product mismatch. An Enterprise SSO setup link cannot be used on these pages, and fails with a 403. An
expired link fails with a 401, and an unknown one with a 404.
Setup link API
The setup link pages call these routes. The token in the path authorizes the request, and every route answers an error as
{ "error": { "message": "..." } }.
| Route | Response |
|---|---|
GET /api/setup/{token} | 200 with the link's details in data, without its tenant, product and webhook |
GET /api/setup/{token}/directory-sync | 200 with the link's directories in data: id, type, name and deactivated |
POST /api/setup/{token}/directory-sync | 201 with the new directory, in the same form, in data. The body sets only type |
GET /api/setup/{token}/directory-sync/{directoryId} | 200 with the directory in data, adding scim, google_authorized and google_authorization_url |
PATCH /api/setup/{token}/directory-sync/{directoryId} | 200 with the directory's id, type, name and deactivated in data. The body sets only deactivated |
DELETE /api/setup/{token}/directory-sync/{directoryId} | 200 with data set to null |
GET /api/setup/{token}/directory-sync/providers | 200 with the supported directory providers in data |
