Skip to main content

SCIM provisioning (Okta, Microsoft Entra ID, Google Workspace)

SCIM lets your identity provider manage MonoPbx accounts for you: it creates a user as soon as you assign them in the provider, keeps their name and e-mail address up to date, and disables them the moment they leave or are unassigned. This is the opposite direction from directory sync, where MonoPbx reads your directory; with SCIM, the provider pushes to MonoPbx. It can be combined with single sign-on, so people created by SCIM sign in with the same provider.

Before you start​

  • You need the settings:write permission to turn SCIM on and manage the token, and settings:read to see the settings.
  • Decide the department new accounts join, and whether they get an extension from a range you choose.
  • Decide whether a SCIM user whose e-mail address already has an account in MonoPbx should be linked to it, or refused. Linking is off by default.
  • SCIM never deletes an account. Deactivating a user at the provider disables the matching MonoPbx account, revokes its devices, API keys and sessions, and the account can be re-enabled later.

Turn it on​

  1. Open Security, Single sign-on (/admin/sso) and go to the SCIM provisioning section.
  2. Turn on Accept SCIM requests, choose the department for new accounts, and optionally an extension range.
  3. Click Create token. The token is shown once — copy it now. Only its hash is kept, so if you lose it you must rotate it and update the provider.
  4. Note the base URL shown on the page: your company address plus /scim/v2. You will enter both the base URL and the token at the identity provider.

Rotating the token stops the old one working at once; revoking it stops provisioning until you create a new one.

Connect Microsoft Entra ID​

  1. In the Entra admin center, open Enterprise applications, New application, and create your own application (non-gallery).
  2. Open its Provisioning page and set the mode to Automatic.
  3. Under Admin Credentials, set Tenant URL to the base URL from MonoPbx and Secret Token to the token. Click Test Connection.
  4. Under Mappings, the default Provision Microsoft Entra ID Users mapping works as is. Assign the users and groups that should be provisioned, then turn provisioning On.

Entra capitalises operation names and sends booleans as strings; MonoPbx's SCIM server already accounts for this, so no special configuration is needed.

Connect Okta​

  1. In the Okta admin console, create the application (a SCIM-capable app, or your own app integration with SCIM provisioning enabled) and open its Provisioning tab.
  2. Choose SCIM and enter the SCIM connector base URL (the base URL from MonoPbx) and the Unique identifier field for users: userName.
  3. Set Authentication Mode to HTTP Header, and enter the token as the bearer token. Click Test Connector Configuration.
  4. Under To App, enable Create Users, Update User Attributes and Deactivate Users. Enable Push Groups if you want Okta groups to reach MonoPbx.
  5. Assign people and groups to the application to start provisioning them.

Connect Google Workspace​

Google Workspace provisions through a custom SAML app's provisioning settings (available on editions that support automated user provisioning for third-party apps):

  1. In the Admin console, open Apps, Web and mobile apps, and add a custom SAML app (or open an existing one configured for single sign-on).
  2. Open its Automatic provisioning settings, set Authorization header to the token, and the SCIM base URL to the base URL from MonoPbx.
  3. Choose which organizational units and groups to provision, then turn provisioning on.

If your edition does not offer automatic provisioning for a custom app, use single sign-on for authentication and directory sync from Microsoft 365 or LDAP to provision accounts instead.

Groups, departments and roles​

A group your identity provider pushes can be mapped, by its display name (case-insensitive), to a department, a company-wide role, or both. Add mappings under Group mappings on the SCIM provisioning page:

  • A person who joins a mapped group moves to its department and is granted its role. Leaving the group undoes only what the membership granted — a role the person already had some other way stays, and the department falls back to another mapped group, then to the default department above.
  • A mapping can instead grant a role for one department only (a delegated administrator), so a group such as "Sales admins" becomes a department admin of Sales without the role's company-wide permissions. See Users and roles for what each role can do.
  • The Owner role can never be mapped, and owners and holders of a system role are never changed by SCIM.
  • Changing a mapping is applied to the group's current members at once; removing a mapping takes back only the access it granted.

What syncs​

SCIM attributeMonoPbx
userNameThe sign-in e-mail address
name, displayNameFirst and last name
emailsE-mail address
activeEnabled / disabled
phoneNumbers (work)The requested extension, if free and inside your configured range
Enterprise extension departmentDepartment, matched by name (case-insensitive; never created)
Group membershipsDepartment and role, through your group mappings above

Attributes MonoPbx does not use (job title, preferred language, and others) are accepted and ignored, so they will not cause errors at the provider.

Troubleshooting​

  • Test connection fails: check the base URL ends in /scim/v2 and that the token has not been revoked or rotated since you entered it at the provider.
  • A user is refused with a conflict: the e-mail address already belongs to an account in MonoPbx. Turn on account linking in the SCIM settings, or resolve the duplicate address.
  • A new user has no extension: the configured range is full, or the requested extension (from a work phone number) is already taken or outside the range; the account is still created, without one.
  • A disabled user still appears able to call from a desk phone: the registrar drops its active sessions immediately, but a phone already mid-registration catches up within a few minutes.

Every change SCIM makes is recorded in the audit log and, for anyone watching with the events API or a webhook, as a scim.* event.