SCIM provisioning

Let your directory add people to Mayfly and turn them off, with Okta, Microsoft Entra ID or any SCIM 2.0 client.

Set it up

SCIM comes with the 100,000 mail and 500,000 mail plans. Your directory adds people as members and turns them off when they leave.

  1. Set up single sign-on with sign-in on, and an SSO domain.
  2. On Settings → Single sign-on, choose Turn on SCIM, name your directory, and copy the token. It's shown once.
  3. In your directory's SCIM app, give the base URL below, and the token as a bearer token.
  4. Assign people to the app.
Base URL
https://mayfly.aravaltech.com/scim/v2
Authentication
Authorization: Bearer <token>

Rotate the token on the same card if it leaks: the old one stops at once. A SCIM token opens only SCIM, for your workspace. It isn't an API key, and an API key doesn't open SCIM.

What Mayfly reads

  • userName: the person's email, on one of your SSO domains. Anything else is refused.
  • name.givenName, name.familyName, displayName: the name Mayfly shows.
  • externalId: your directory's own id for them.
  • active: false turns them off, true turns them on again.

Everything else, emails and passwords included, is accepted and not kept. A new userName changes the person's email in Mayfly, if it's on an SSO domain and no other account has it. They sign in with the new one from then on.

Users only: /Users takes GET, POST, PUT, PATCH and DELETE, with filters such as userName eq "lee@acme.test" and paging by startIndex and count. There are no Groups, bulk requests or sorting, as /ServiceProviderConfig says.

Okta

  • Turn on SCIM provisioning in your Mayfly app integration, with the base URL as the SCIM connector base URL.
  • Set the unique identifier field for users to userName, and authentication to HTTP Header with the token.
  • Choose Push New Users and Push Profile Updates. Leave Push Groups off.
  • Under To App, turn on Create Users, Update User Attributes and Deactivate Users.

Microsoft Entra ID

  • In your Mayfly enterprise application, set provisioning to Automatic, with the base URL as the tenant URL and the token as the secret token.
  • Turn off the group mapping, Provision Microsoft Entra ID Groups: Mayfly has no groups.
  • Map userName to the attribute your SSO sends as the email, often userPrincipalName or mail.
  • Entra turns someone off when they're unassigned, and deletes them when they're deleted for good.

Turning people off

  • Turned off: they can't sign in, and every session they had ends at once. They stay on the Team page, marked Deactivated, with their role, and come back as they were when turned on.
  • Deleted: they're removed, as Remove on the Team page does. Added again, they come back as a member.
  • API keys belong to the workspace. Turning off or removing a person doesn't revoke keys they made: revoke those on Settings → API keys.

Sign-up by SSO

While SCIM is on, SSO adds nobody new. Only people your directory added, and existing members, sign in. Revoking the token brings sign-up by SSO back, and anyone turned off stays off.

Roles

Your directory adds everyone as a member, and never changes a role. Promote admins in Mayfly, on Settings → Team. The last admin who can sign in can't be turned off or deleted through SCIM.

NextAPI reference