Create one enterprise application in Microsoft Entra ID, and set up SSO (OpenID Connect) and automatic provisioning with SCIM 2.0.
Shared values and troubleshooting are on the Connect your identity provider page. Screen names follow Microsoft’s official documentation as of October 2026.
What you need
- The Application Administrator role or higher in the Microsoft Entra admin center (https://entra.microsoft.com).
- SSO (OpenID Connect) is available on the free tier of Entra ID.
- SCIM (automatic provisioning) for an app that isn’t in the gallery requires Entra ID P1 or higher (included in Microsoft 365 E3 and E5, Business Premium and others).
- The administrator of the Aiyori organization must be able to open “Settings” → “Connect your company’s identity provider” on the trainer’s screen.
You set up both SSO and SCIM on one app. Creating an enterprise application also creates an app registration with the same name. SSO is set up in the app registration, and SCIM in the enterprise application.
1. Create the app
- Entra admin center → Entra ID → Enterprise applications → + New application → + Create your own application.
- Enter Aiyori as the name, choose Integrate any other application you don’t find in the gallery (Non-gallery), then Create.
- In the app’s Properties, set Assignment required? to Yes (only assigned people can log in). To put a tile in My Apps, enter https://app.aiyori.app/
api/ web/ sso/ start?code=(organization code) as the Home page URL. Then Save.
2. SSO (OpenID Connect)
- Entra ID → App registrations → All applications → open the Aiyori app you created in section 1.
- On Overview, note the Directory (tenant) ID and the Application (client) ID.
- Authentication → + Add a platform → Web → enter https://app.aiyori.app/
api/ web/ sso/ callback as the redirect URI → Configure. Don’t check the two implicit grant boxes (Aiyori uses the authorization code flow with PKCE). - Certificates & secrets → Client secrets → + New client secret → description Aiyori, expiry 12 months recommended (24 months at most) → Add → note the Value (it’s shown only on this screen).
- Token configuration → + Add optional claim → ID → check email → Add. If asked whether to turn on the Microsoft Graph email permission, check it and add.
- API permissions can stay at the default User.Read (Aiyori asks only for openid email profile, so no admin consent is needed).
- On Aiyori’s trainer screen, go to “Settings” → “Connect your company’s identity provider” → “SSO”, enter the values in the table below and press “Save”.
- Enterprise applications → Aiyori → Users and groups → + Add user/group, and assign one person to test with.
- If that person can go from Aiyori’s login screen → “Log in with company account” → organization code → Microsoft login → back to Aiyori, the connection works. If SCIM isn’t connected yet, register them as a learner first (with their work email address), or turn on “When someone who isn’t registered yet logs in, register them as a learner”.
- Once you have confirmed that everyone can get in, turn on “Turn off PIN login and allow company accounts only” if you need it.
- Issuer URL
- https://login.microsoftonline.com/
(Directory (tenant) ID)/v2.0 - Client ID
- Application (client) ID
- Client secret
- The Value you noted in step 4 (not the Secret ID)
- Allowed email domains
- Your company’s email domains (e.g. example.com). If people with onmicrosoft.com addresses should get in too, add that on its own line. People whose token has no email are checked by the domain of their UPN, so if your UPN domain differs from your email domain, add it as well.
When the secret expires, nobody can get in with a company account. Create a new secret before it expires and replace it on Aiyori’s screen. It helps to put the date in your IT team’s calendar.
The common, organizations and consumers issuers, and issuers without the trailing /v2.0, are refused with a reason when you save (they would let people from any tenant in). If you enter a tenant name such as contoso.onmicrosoft.com instead of the tenant ID, it’s converted to the tenant ID form when you save.
Even if your UPNs differ from your email addresses, people added through SCIM are also found by their UPN, so adding email in step 5 isn’t required. If you add people with bulk registration or automatic registration instead of SCIM, add email in step 5 (otherwise they are registered as a separate person under their UPN address).
3. SCIM (automatic provisioning)
- In Aiyori, go to “Connect your company’s identity provider” → “SCIM”, enter Entra ID as the “Key name” and press “Create key” → note the key that appears (it’s shown only on this screen).
- Enterprise applications → Aiyori → Provisioning → + New configuration (on the older screen, Get started → set Provisioning Mode to Automatic).
- Under Admin Credentials, choose Bearer authentication, enter https://app.aiyori.app/
api/ scim/ v2 as the Tenant URL, and the key from step 1 as the Secret Token. - Test Connection → if it succeeds, Create (or Save). Entra ID looks up one person who doesn’t exist and checks that an empty list comes back.
- Mappings can stay at their defaults (what to check is in the table below).
- Under Settings, keep Scope at Sync only assigned users and groups (the default). Enter your IT team’s address as the Notification Email for when sync stops, and turn on Prevent accidental deletion.
- Under Users and groups, assign the groups that should use Aiyori (departments, hiring years and so on).
- Send one person with Provision on demand, and check that they appear in Aiyori’s list of learners.
- Start provisioning. The first cycle takes time depending on the number of people; after that, it syncs about every 40 minutes. Results are in the Provisioning logs.
| Attribute (Aiyori) | Entra ID value (default) | How Aiyori uses it |
|---|---|---|
| userName | userPrincipalName | Aiyori keeps the UPN it receives and returns it as is (Entra ID uses it to find the same person). No need to change it, even if your UPNs differ from your email addresses. |
| emails[type eq "work"].value | Becomes the work email address Aiyori uses to identify people (the same value as the SSO email and bulk registration). If mail is empty, the UPN is used. | |
| active | A Switch expression using IsSoftDeleted | People who are disabled or unassigned can no longer log in. |
| externalId | mailNickname | You may change it to objectId (it doesn’t change when a name changes). |
| Groups | Provision Microsoft Entra ID Groups enabled | Groups such as departments become Aiyori groups. Disable it if you don’t use groups. |
| Department, employee number, etc. | (leave as is) | Not used, even if sent (no need to remove them). |
4. Check on the day you connect
- One assigned person can get in with a company account. People who aren’t assigned are stopped on the Microsoft screen (because assignment is required).
- The person sent on demand appears as an Aiyori learner and is in their groups.
- When you unassign that person and send them on demand again, they show as “Disabled by company settings” in Aiyori and can’t log in. When you restore them, they can get in again.
- The secret’s expiry date is in your IT team’s calendar.
How Entra ID works with Aiyori
- The issuer is per tenant. Both iss and tid (the tenant ID) in the ID token must match the registered tenant, so people from other companies’ tenants can’t get in.
- Entra ID doesn’t send email_verified. Aiyori narrows things down by issuer, tenant and allowed domains, then uses the email it receives (or the UPN if there is none).
- SCIM PATCH requests with "op": "Replace" (capitalized, as are Add and Remove), the string "False", and PATCH without a path are all accepted. Bodies are application/scim+json.
- People can be looked up with filter=userName eq (the UPN, case-insensitive) or by externalId. Adding and removing group members (Add and Remove on members) is accepted.
- Sync runs about every 40 minutes. When you’re in a hurry, send people on demand.
- SCIM keys don’t expire. Once a year or so, create a new key, enter it in Entra ID, and set the old key to “Revoke” in Aiyori.
- Of the Microsoft Entra SCIM Validator checks, only one isn’t met: a GET for a deleted user returning 404. This is because Aiyori doesn’t erase records on delete but suspends the learner instead. Regular sync sends active: false when someone is unassigned, so it isn’t affected.
