Let your identity provider add, update, suspend and remove the people in your Flow Payroll account, and give them account-wide roles, over SCIM 2.0.
Flow Payroll supports SCIM 2.0 (RFC 7643 and RFC 7644), the standard identity providers use to keep the people in other applications in step with their directory. Point your identity provider at it, and joiners, changes and leavers in your directory reach your Flow Payroll account without anybody inviting or removing them by hand.
SCIM sits next to the people operations of the Administration API, which keep working. Use either; both change the same people.
Base URL
https://api.flowpayroll.ai/v1/administration/scim/v2In sandbox, use https://api.sandbox.flowpayroll.ai/v1/administration/scim/v2.
Authentication
SCIM is called by one of your account's API tokens, never by a person.
- Create an API token for your identity provider with
POST /api-tokens, sendingallOrganisations: truefor account-wide access, and a role that includesuser:write, such as Administrator (HR integration, once it can be given). To suspend and remove people as well, the role also needsuser:delete. - Exchange its client id and secret for an access token, as for any API token. See Authentication.
- Send the access token as
Authorization: Bearer <token>. SCIM clients send their credential this way, so SCIM takes it there rather than inX-Auth-Token.
A person's credentials, or a token without user:write across the whole account, get 403. The discovery endpoints below can be read by any caller of your account.
What is supported
| Endpoint | Supported |
|---|---|
/ServiceProviderConfig, /ResourceTypes, /Schemas | Read |
/Users | List, filter, create, read, replace (PUT), change (PATCH), delete |
/Groups | List, filter, read, replace members (PUT), add or remove members (PATCH) |
/Groups create and delete, /Bulk, /Me | Not supported: 501 |
/ServiceProviderConfig says the same thing to your identity provider: PATCH and filtering are supported, bulk, sorting, password changes and ETags are not.
Every answer, errors included, is application/scim+json in the shapes RFC 7644 defines, with a scimType where one applies.
Users
A SCIM user is a person who can sign in to your account: one of your account's people, or a guest your account manages because they sign in through your identity provider. Guests are listed after your people. Guests with a password of their own are not your account's to provision, and answer 404.
| Attribute | Notes |
|---|---|
userName | The person's sign-in email address. Required, unique, and never changes (400 with mutability). To change it, delete the user and provision them again with the new address. |
name.givenName, name.familyName | First name (required) and last name. |
displayName | Can change. |
externalId | Your directory's id for the person. Unique in your account. |
emails | Read-only, from userName. |
active | false suspends the person, true restores them. |
urn:flowpayroll:scim:schemas:extension:access:2.0:User | Optional. userType (Member or Guest, fixed once the user exists) and access, the same list of grants POST /users takes: each grant is a scope (type Account, Organisation or OrganisationGroup, and its id) and a roleId. |
- Create (
POST /Users) adds the person across your whole account with your account's default role. While only Administrator can be given, that is Administrator. Send the access extension to give them specific organisations or organisation groups with a role in each instead, or to add them as a guest; it is checked exactly asPOST /userschecksaccess. AuserNameorexternalIdalready in your account answers409withuniqueness. - Replace and change (
PUT,PATCH) with the access extension give the grants you send and then take away the ones you left out. Without it, access is left as it is. - Suspend with
active: false: their sign-in is disabled, they are signed out everywhere, and their access is kept for when they return.active: truelets them sign in again. Both needuser:delete. - Delete (
DELETE /Users/{id}) removes the person from your account: their access goes, and their sign-in is disabled and signed out everywhere. For a managed guest it removes the access your account gave them, leaving access other accounts gave, and closes their sign-in, because your account controls it. It answers204and needsuser:delete. - The account owner can never be suspended or removed over SCIM (
403). Once roles other than Administrator can be given, a person who holds more than your API token does cannot be suspended or removed by it either (403). PATCHfollows RFC 7644 and is all or nothing: if one operation fails, none is applied.GET /Users/{id}answers404for anybody who is not one of your account's people or a guest it manages. Single reads carry the access extension.
Groups are roles
Each SCIM group is a role a person can hold, and its id is the role's roleId, such as payroll-manager or custom.hr-team. Roles themselves are created, changed and deleted in the admin area or with /roles, never over SCIM, and a group's displayName cannot change.
- Adding a person to a group gives them that role across your whole account, including organisations added later.
- Removing them gives them your account's default role back.
PUT /Groups/{id}replaces everybody who holds the role across your account with themembersyou send.- The same rules as everywhere else decide which roles can be given. See Users, roles and permissions.
Every group carries urn:flowpayroll:scim:schemas:extension:access:2.0:Group with scope set to Account: membership always means the whole account. Give access to some organisations only, or through an organisation group, with the user's access extension, in the admin area or with /users.
Filtering and paging
Filters on /Users | userName eq, externalId eq and id eq only. Anything else answers 400 with invalidFilter. |
Filters on /Groups | displayName eq and id eq. excludedAttributes=members leaves members out. |
| Default paging | By cursor (RFC 9865): send count, and follow nextCursor until it is absent. |
| Index paging | Send startIndex (from 1) instead, as RFC 7644 describes. Sending both startIndex and cursor answers 400 with invalidValue. |
| Page size | count is 50 by default and at most 100. A larger count returns 100. |
Other answers
412when somebody else changed the same person or role first. Read it again and repeat the change.503when access could not be checked just now. Nothing was changed; try again in a moment.
Limits
- No bulk requests: send each change on its own.
- No sorting, no password changes and no ETags.
- At most 100 results per page, and per filter.
- Groups give one role per person across the whole account. Access to some organisations only goes through the user's access extension.
