SCIM provisioning
For IT administrators
With SCIM, your directory keeps CardOffice’s list of cardholders up to date. A new employee appears ready to be photographed, a change of name or department flows through on the next provisioning cycle, and a leaver is deactivated. No spreadsheets, and nothing typed twice.
SCIM 2.0 works with Microsoft Entra ID and Okta.
SCIM provisions cardholders, the people who get cards. Staff accounts for the portal come from single sign-on or invitations.
What you need
Section titled “What you need”Both come from Settings → Integrations → SCIM provisioning:
- Tenant URL:
https://app.cardoffice.nz/api/scim/v2 - Secret token: created there and shown once. Store it only in your identity provider. Give it an expiry and replace it before then.
What maps to what
Section titled “What maps to what”| Your directory sends | Becomes | Notes |
|---|---|---|
userName |
The link to the directory account | Required |
name.givenName, name.familyName |
First and last name | Required |
emails (primary, otherwise work, otherwise the first) |
Used for photo links | |
phoneNumbers (the same rule) |
Phone | |
employeeNumber (enterprise extension) |
ID number, printed on the card | Map your employee ID here |
department (enterprise extension) |
Department | |
userType |
Holder type | Through the token’s mapping table. A value that is already a holder type (student, staff, contractor, visitor, access, member) needs no row. Unmatched values use the token’s default |
nickName |
Preferred name | Optional. displayName is ignored. See Preferred names |
active |
Status | false makes the person inactive; true makes them active again |
SCIM never changes photos, expiry dates or custom fields.
Preferred names
Section titled “Preferred names”A preferred name replaces the first name on the verification page and on digital IDs, and on printed cards whose design uses it. A person called Jane Doe who prefers JJ is shown as JJ Doe.
Through SCIM it comes from nickName only. A directory’s displayName is
ignored, because it is a whole name that already includes the last name, and
directories often build it as Doe, Jane or Jane Doe (Library). If your
directory holds a field for the first name a person goes by, map it to
nickName. Otherwise send nothing, and everyone is shown by their first and
last name.
A sync that sends no nickName leaves any preferred name already set in
CardOffice as it is, so staff can still set one by hand.
People already in CardOffice
Section titled “People already in CardOffice”If people were loaded before you turned on SCIM, CardOffice matches them rather than creating duplicates: first by your directory’s own identifier, then by employee number. After the first successful match, the directory’s identifier is what links the two, so later changes to email or name follow the right person.
If two people in your directory share an employee number, the second is refused with a conflict, which shows in your identity provider’s provisioning log. Correct the number in the directory. CardOffice will not guess which person is which.
When someone leaves
Section titled “When someone leaves”| In your directory | CardOffice receives | In CardOffice |
|---|---|---|
| A user is disabled, unassigned from the app, or moved out of scope | active: false |
The person becomes inactive |
| A user is deleted (Entra sends this when a user is permanently deleted) | DELETE |
The person becomes inactive. Nothing is deleted |
| A user is enabled or assigned again | active: true |
The person is active again |
When a person becomes inactive:
- their card, and any digital ID, stops verifying immediately
- any card still waiting to be printed for them is cancelled
- the
card_holder.status_changedwebhook is sent, so a door access system can act on it - their photos, card history and audit trail are kept, under your organisation’s retention settings
Cards they already hold are not revoked. If the person comes back, the same card verifies again. See Deactivating is not revoking.
Microsoft Entra ID
Section titled “Microsoft Entra ID”SCIM provisioning in Entra needs a Microsoft Entra ID P1 or P2 licence.
First, check three fields on each user you will provision. Entra’s new-user form does not require them, and each gap causes a specific problem:
| Entra user field | Becomes | If it is empty |
|---|---|---|
| First name and Last name | The person’s name | The person is refused. A display name alone is not enough |
| Employee ID | The ID number on the card | The person arrives with no ID number |
| Where photo links are sent | The person arrives without an email. Cloud-only accounts often start with this empty |
Put the people to provision in one group, such as CardOffice cardholders. Keep service and emergency accounts out of it: the group is the roster.
- Create the application. In the Entra admin centre go to Enterprise applications → New application → Create your own application, and choose Integrate any other application you don’t find in the gallery.
- Set up provisioning. Choose Automatic, enter the tenant URL and the
secret token, and select Test connection. The tenant URL must end in
/api/scim/v2. Save. - Change one attribute mapping. Map
employeeIdtourn:ietf:params:scim:schemas:extension:enterprise:2.0:User:employeeNumber. Leave the other mappings as they are. A greyed-out attribute in the picker means a mapping already exists, so edit that row rather than adding another. - Assign the group under Users and groups.
- Try one person. Use Provision on demand and check the person appears in CardOffice with every expected field.
- Turn provisioning on. Entra then runs a cycle about every 40 minutes.
Where each field comes from in Entra:
| CardOffice | Entra user field | Notes |
|---|---|---|
| First and last name | First name (givenName), Last name (surname) |
Both required |
Email (mail) |
||
| Phone | Business phone (telephoneNumber) |
Sent as the work number, so it is used ahead of a mobile number |
| ID number on the card | Employee ID (employeeId) |
The mapping you change in step 3 |
| Department | Department (department) |
|
| Preferred name | Not sent by default | Optional. Map an attribute that holds the first name a person goes by to nickName. Do not map an alias or a full name. Display name is ignored. See Preferred names |
| Holder type | Any attribute you map to userType |
Optional. Without it, everyone gets the token’s default type |
| Status | Account enabled, app assignment, deletion | Through Entra’s standard IsSoftDeleted rule. See When someone leaves |
| Link to the account | User principal name (userPrincipalName) |
Sent as userName |
| Problem | Cause | Fix |
|---|---|---|
404 on test or provision |
The tenant URL does not end in /api/scim/v2 |
Correct it and save. If the 404 continues, choose Restart provisioning on the overview page, because Entra keeps the old setting until then |
400 “name.givenName and name.familyName are required” |
The user has a display name but no first or last name | Fill both in, then provision again |
| The person arrives with no email or no ID number | The user’s Email or Employee ID field is empty | Fill it in, then provision again |
- Go to Applications → Create App Integration and choose SCIM 2.0 Test App (OAuth Bearer Token), or add SCIM provisioning to an existing app.
- Under Provisioning → Integration, set the SCIM connector base URL to the
tenant URL, the unique identifier field to
userName, and authentication to HTTP Header with the secret token as the bearer token. - Turn on Create Users, Update User Attributes and Deactivate Users.
- In the attribute mappings, map your employee ID field to
employeeNumber, anduserTypeif you use holder-type mapping. - Assign one test user and check them in CardOffice, then assign your groups.
Where each field usually comes from in Okta:
| CardOffice | Okta profile attribute | Notes |
|---|---|---|
| First and last name | firstName, lastName |
Both required |
email |
||
| Phone | primaryPhone |
|
| ID number on the card | employeeNumber |
Or whichever attribute holds your employee ID (step 4) |
| Department | department |
|
| Preferred name | nickName |
|
| Holder type | userType |
Optional. Without it, everyone gets the token’s default type |
| Status | Deactivating or unassigning the user | Sent as active: false. See When someone leaves |
| Link to the account | Username (login) |
Sent as userName |
Google Workspace
Section titled “Google Workspace”Google Workspace does not send SCIM to other applications. If your organisation uses Workspace as its directory, talk to us about keeping the roster in step. Signing in with Google accounts is separate, and covered by single sign-on.
Troubleshooting
Section titled “Troubleshooting”- Every change SCIM makes is in the audit log, labelled SCIM provisioning, so you can see why a record changed.
- Your identity provider’s provisioning log shows the exact responses
CardOffice sent. A
409names the conflicting value. 429responses mean a cycle is sending requests too fast. Entra and Okta slow down and retry by themselves.- Revoking the token stops provisioning at once. Nothing already created is changed.
401on every call, with a token that has not been revoked or expired, usually means your organisation has an IP allowlist under Settings → Security that leaves out your identity provider’s addresses. Calls from outside the list are refused as if the token were wrong.
© 2026 Secure ID Ltd. All rights reserved.Documentation licence and terms