Member Provisioning: SCIM/Invitations/SSO
Three ways to make your personnel members of a MaiAgent organization: the SCIM provisioning API (for customer IT teams and managed services from ISVs), admin-console invitations, and automatic provisi
A MaiAgent “member” is a person with an account in an organization (such as an employee or administrator), associated with role permissions, a Credits quota, and MaiGPT access. This is separate from Web Chat “contacts” (your customers, members, and anonymous visitors). This page explains how to provision members and is intended for two audiences:
Your own IT team: Add company employees to MaiAgent in batches and automatically deactivate them when they leave.
ISVs/system integrators: Manage customer organizations, programmatically provision customer personnel, and then embed MaiGPT in your system with member identity embedding.
Creating and synchronizing contacts (customer-side users) is outside the scope of this page. See the Software Vendor Integration Guide.
Terminology: A SCIM Group and an IdP group are both called a “role” in the MaiAgent admin console. A role determines which AI Agents and knowledge bases a member can use, as well as the models, tools, and connectors available in MaiGPT. This page uses “group” in an API context and “role” in an admin-console context; they refer to the same thing.
1. Choosing among the three approaches
SCIM provisioning API (focus of this page)
Programmatic or IdP automation; managed services from ISVs. An IdP is not required: use real-time event synchronization or the roster sync tool.
Your system or IdP proactively pushes data
Push active: false to deactivate
Requires SSO (accounts created by SCIM have no password); signing in is unnecessary when only using member identity embedding
Admin-console invitation (Email invitation/organization invitation link)
Up to a few dozen people with no desired integration
An administrator acts in the console, and the recipient opens an email or link
An administrator deactivates the member in the console
Set a password through Email, or use SSO
Automatic provisioning through SSO login
Employees who already sign in to the MaiAgent website or app
A member is created automatically upon the first SSO login
Depends on whether the IdP permits login; existing members must be deactivated separately
Keycloak/SAML/EIP/Cloudflare Access
The three approaches can be combined. Common combinations are SCIM for roster management + SSO for login, or SCIM for roster management + member identity embedding (employees never sign in to MaiAgent).
2. SCIM provisioning API
MaiAgent provides each organization with an inbound SCIM 2.0 endpoint (identity synchronization is an Enterprise feature; contact Sales to confirm whether it is included in your plan). It is a standard REST interface. You can enter its Endpoint and Token in an IdP such as Okta, Microsoft Entra ID, or JumpCloud and let the IdP push automatically, or call it directly from your own backend.
Pre-integration checklist
Organization plan includes identity synchronization
Enterprise feature; contact Sales if unsure
Organization ID and SCIM Token
Admin console: “Identity synchronization → SCIM → Connection information.” The Token is shown only once.
Create roles and configure permissions first
Members created through SCIM are not added to the default role, and roles created automatically through SCIM have no permissions—this is the cause in most cases where a new member cannot use anything. We recommend first creating roles in the admin console (such as “Customer Service” and “Manager”) and configuring permissions, including MaiGPT access, then assigning those exact names through SCIM.
Plan capacity
Built-in Agent seats and per-member Credits quota
Start with a small test
Create three to five people first, then confirm their names, roles, and MaiGPT access in the admin console before provisioning everyone.
Login method
Can be skipped if only using member identity embedding; employees who need to sign in to MaiAgent require SSO.
What happens to existing accounts and members?
If people in the organization already use MaiAgent through Email and password, admin-console invitations, or SSO, enabling SCIM does not invalidate their existing accounts:
Can an existing account still sign in with its password?
Yes. Only accounts newly created through SCIM have no password; passwords and SSO bindings on existing accounts are untouched.
Does enabling SCIM change the login method?
No. “Identity synchronization” only determines whether the SCIM endpoint is available; login methods are managed separately under “Authentication settings.”
Will a duplicate account be created?
No. Email is the account key. If the Email is already a member of this organization, POST /Users returns 409 together with the existing member's id. If the account belongs to another organization, the same account is simply added to this organization.
Are old members not managed by SCIM deactivated?
No. SCIM only deactivates members explicitly sent active: false or DELETE. This site's roster sync tool also deactivates only members it manages (those with an externalId).
Are conversation and quota records lost?
No. Taking over or deactivating a member does not delete member data. Only that member's API Key is revoked immediately upon deactivation.
Only members “taken over by SCIM” will change: after your IdP or program finds an existing member by Email and updates that member, SCIM manages the person:
The display name is overwritten by the IdP/roster value. Display names are account-level, so if the person also belongs to another organization, that organization sees the changed name too.
Roles assigned through SCIM follow the
groups[]value in every subsequent push. Roles added manually in the admin console are retained.If the person is deactivated or removed from the IdP or roster, the member is deactivated in MaiAgent as well. Even if the member previously used password login, they can no longer use this organization after deactivation.
Before pushing from an IdP such as Okta or Entra ID, confirm the IdP assignment scope: existing members within the scope will be taken over and subsequent suspensions and name changes will follow the IdP. We recommend first assigning three to five people (including one existing member), confirming their names, roles, and login in the admin console, and only then expanding the scope.
Enable SCIM and obtain a Token
Sign in to the admin console as the organization owner (or a member with the “Manage identity synchronization” permission), go to “Organization settings → Identity synchronization,” and select SCIM as the synchronization method.
The “Connection information” tab shows the Endpoint URL (in the form
https://api.maiagent.ai/api/v1/scim/<Organization ID>) and Token. Click “Regenerate Token” to obtain a new Token.The Token is shown only once. Store it immediately in your server's secret manager. The old Token becomes invalid immediately after regeneration. The admin console reminds you to rotate it after 180 days.
Include these headers in every request:
Each organization is limited to 100 requests per minute. Requests beyond the limit return 429.
Endpoints
GET
/ServiceProviderConfig, /Schemas, /ResourceTypes
IdP discovery
GET
/Users?filter=…&startIndex=1&count=50
List/query members
POST
/Users
Create a member
GET/PUT/PATCH
/Users/{id}
Read/replace fully/update partially (deactivate, rename, or change externalId)
DELETE
/Users/{id}
Deactivate a member (see semantics below)
GET/POST
/Groups
List/create groups (corresponding to MaiAgent roles)
GET/PUT/PATCH/DELETE
/Groups/{id}
Rename a group, add/remove members, or delete it
filter supports userName eq "…", externalId eq "…", and emails.value eq "…" (case-insensitive equality). Groups support displayName eq "…" and externalId eq "…". Pagination uses the standard SCIM startIndex (starting at 1) and count.
User resource fields
userName
Account Email
Required. This is the MaiAgent login account and is also the email used when issuing a token for member identity embedding. It cannot be changed through SCIM after creation (see Lifecycle).
emails[primary].value
Account Email
Takes precedence over userName when supplied
externalId
Personnel ID in your system
Recommended; you can later query it with filter=externalId eq "…"
name.givenName/name.familyName/displayName
Display name
active
Member activation status
Defaults to true; false deactivates the member
groups[].display
Names of groups to join
Maps only to existing groups (first use POST /Groups). See Groups and roles.
The response also includes an id (the MaiAgent member ID, which can also be used as the memberId for token issuance) and meta.
Lifecycle semantics
Create:
POST /Usersuses Email as the key. If the Email already has a MaiAgent account (for example, the same person belongs to another organization), the existing account is added to this organization rather than creating another account. If the member already exists in this organization, it returns409. Newly created accounts have no password and can sign in to the MaiAgent website only through SSO. Personnel who only use member identity embedding do not need to sign in.Deactivate: Use
PATCHto setactivetofalse, or useDELETE /Users/{id}. Both deactivate rather than delete: the member's conversations and quota records remain, the member's API Key is revoked immediately, role permissions cease to apply, and subsequent member token issuance returns404. Roles are restored when the member is reactivated (verified in dev). SCIM cannot deactivate the owner if the organization has only one owner.Reactivate: Use
PATCHto setactiveback totrue, orPOSTthe same Email again.Change Email: Email cannot be changed through SCIM—
userNamewith a different value inPUT/PATCHis ignored (Email is the cross-organization account key). To change Email, an administrator must update it in the admin console, or deactivate the old member and create a member with the new Email (conversation history does not carry over).Update:
PUTreplaces the entire resource andPATCHupdates it partially.PATCHaccepts both{"Operations":[{"op":"replace","path":"active","value":false}]}and{"op":"replace","value":{"active":false}}(used by Okta and Entra respectively).
Groups and roles
A SCIM Group corresponds to a MaiAgent role (which determines which AI Agents and knowledge bases members can use, plus the models, tools, and connectors available in MaiGPT). You must know these three points:
Members created through SCIM are not automatically added to the “default role.” They are added only to roles named in
groups[]; without one, they have no permissions.Roles created automatically through SCIM have no permissions (a role created with
POST /Groupshas only a name). To let members use MaiGPT, enable MaiGPT access in the role permissions in the admin console. See MaiGPT Role Access Permissions. Recommended approach: Create roles and permissions in the admin console first, then assign them through SCIM.A User's
groups[].displaymaps only to a role that is already mapped to SCIM. The mapping is created automatically duringPOST/PATCH /Groups(“Automatically create roles” is enabled by default). To map a role created in the admin console the first time SCIM uses it, callPATCH /Groups/{id}once with the samedisplayName(this site's roster sync tool and real-time sync client do this automatically). With an IdP, specify which role each IdP group maps to on the “Group mapping” tab in the admin console.
Other behavior:
PATCH /Groups/{id}supportsadd/removefor individual members andreplacefor the entire member list.Roles assigned to the same member through SCIM are fully replaced by
groups[]in the next UserPUT/PATCH. Roles added manually in the admin console are unaffected.Deleting a Group only removes the association between members and the role; it does not affect the members themselves.
Examples
Create a member and add them to the “Customer Service” group:
Deactivate an employee who leaves:
Look up a member by the personnel ID in your system:
Two integration approaches that do not require an IdP
Your product is a Web service with its own user management
Real-time sync: Call during user events—call it when a user is added, updated, or deactivated to keep members synchronized in real time.
Your roster is in an HR system, Excel, or a database
Roster sync tool: CSV/JSON/database—run it on a schedule to create people present in the roster and deactivate those absent from it.
You can use both: make event-driven real-time synchronization the primary method and run the roster tool once a day for reconciliation as a safeguard.
Push from an IdP
If a customer uses an IdP such as Okta, Microsoft Entra ID, or JumpCloud, enter the Endpoint URL and Token in the IdP's SCIM provisioning settings. The IdP then pushes users and groups automatically and deactivates departing employees. Also configure the same IdP as SSO (Keycloak or SAML) under “Authentication settings” so employees can sign in directly. For SAML settings, see SAML SSO Integration.
3. Admin-console invitations
When no integration is used, an administrator works in “Organization settings → Member management” in the admin console:
Email invitation: Enter a roster (up to 30 at once). Recipients become members after opening the email and setting a password.
Organization invitation link: Share the link with employees so they can join on their own.
For instructions, see Member Management in the user manual.
4. Automatic provisioning through SSO login
When employees need to sign in to the MaiAgent website, the MaiGPT web app, or the app themselves, configure SSO so they can use their corporate accounts:
Keycloak, EIP
Automatically creates an account and adds it to the organization
SAML (including ADFS)
Automatically creates an account; whether it joins the organization depends on the authentication source's settings. Confirm with your integration contact.
Cloudflare Access
Depends on the authentication source's “Automatically provision members” toggle. When disabled, only existing members are allowed.
For setup instructions, see Third-party Login (SSO) in the user manual and the technical documentation's SAML SSO Integration. SSO provisions a member only upon login. Use SCIM or the admin console to deactivate departing employees; do not rely only on the IdP denying login.
5. Connecting to MaiGPT member identity embedding
For ISVs that manage customers and want to embed MaiGPT in their own system, the two APIs work together as follows:
When onboarding a customer, use SCIM
POST /Usersto create a member (userNameis the employee Email andexternalIdis the personnel ID in your system), and add the member to a group with MaiGPT access.When an employee opens your page, your backend calls member token issuance with the organization's API Key. Set
emailto the same Email (or setmemberIdto theidreturned by SCIM).When an employee leaves, deactivate the member through SCIM. Subsequent issuance returns
404, so the embedded page naturally stops working.
Employees never need to sign in to MaiAgent, so SSO is unnecessary. Add SSO only if you also want to make the MaiGPT web app or app available.
6. FAQ
Last updated
Was this helpful?