Connecting Microsoft 365
This page is for an organization's administrators. Connecting lets Empeiro bring in eligible people from your Microsoft 365 directory with their name, job title, department and photo, keep them up to date, decide who answers tickets from a security group, and let people sign in with their work account. The directory connection does not read anyone's email, and Empeiro writes nothing to Microsoft 365. Tickets, messages and the knowledge base live in Empeiro.
You connect with an app registration you make in your own Microsoft 365. Empeiro has no app of its own in your tenant and never registers anything there; you create it, you can see everything it may do, and you can delete it at any time.
Before you start
- Arrange app-registration rights and a tenant administrator who can grant Microsoft Graph application permissions. A Privileged Role Administrator or Global Administrator can complete the consent step; a lower app-registration role alone is insufficient for these Graph application permissions. Microsoft explains the consent roles.
- Hybrid organizations (Active Directory in the office, synced to Microsoft 365) connect the same way. Empeiro reads the copy that your AD sync puts in Microsoft 365, so a change made in AD appears after your next AD sync cycle and then Empeiro's next sync.
- Allow about 10 minutes for the whole thing.
- Have access to the correct organization inside Empeiro as its administrator. The management account creates that organization and its first administrator first: Adding an organization.
- Keep a working Empeiro password or passkey available until work-account sign-in has been checked. Save credentials in your password manager, never in a ticket.
Important: Save and test starts a real employee directory import when the test passes. It is not a preview. Complete the preparation below before selecting it. For the current rollout, wait for the operator's security-release clearance before that step.
This connection uses Microsoft Entra ID, the cloud directory for your Microsoft 365 tenant (formerly Azure Active Directory). It does not connect directly to an office domain controller. In a hybrid environment, first confirm that the intended employees are present and enabled in Entra ID.
Step 1: create the app registration in Microsoft
This gives Empeiro an identity in your Microsoft 365 and tells Microsoft what it may read.
Sign in to the Microsoft Entra admin center at
https://entra.microsoft.comas a Global Administrator. Check the directory name in the portal before continuing. For the firm's own help desk, use the firm's tenant. Each customer makes this registration in its own tenant and enters it in its own Empeiro organization.In the left menu go to Entra ID → App registrations and click New registration. (In older menus the path is Identity → Applications → App registrations.)
Fill in the form:
- Name:
Empeiro - Supported account types: Single tenant only (older wording: Accounts in this organizational directory only).
- Redirect URI: for employee Microsoft sign-in, choose Web and enter
https://empeiro.app/api/auth/microsoft/callback. For a different installation, copy its exact URI from Microsoft 365 ? Sign in with a work account. Directory-only use does not need a callback; configuring it now prepares SSO correctly. - Click Register.
- Name:
You land on the app's Overview page. Two values here go into Empeiro; copy them somewhere safe:
- Application (client) ID, a value like
aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee - Directory (tenant) ID, the same shape
- Application (client) ID, a value like
In the left menu of the app, open API permissions. The list already shows one row, User.Read of type Delegated: Microsoft adds that to every new registration. Leave it there. Now click Add a permission, choose Microsoft Graph, then the Application permissions box (the one on the right, not Delegated). In the search box find and tick:
- User.Read.All: reads people's profiles and photos.
- GroupMember.Read.All: reads which security groups people are in, so you can choose a group whose members are agents. Harmless if you mark agents by hand.
- Organization.Read.All: reads the tenant name, verified domains and license information. Include it for employee single sign-on: without verified-domain discovery, directory sync can succeed but work-account email routing is unavailable. Microsoft lists the organization API application permissions.
Click Add permissions.
Still on API permissions, click Grant admin consent for (your organization) and confirm. The Status column should show a green tick and Granted for … on every row, the delegated one included. Without this step Empeiro is refused.
Open Certificates & secrets, then Client secrets → New client secret. Give it a description such as
Empeiroand choose the expiry offered by your tenant's policy. Record a replacement reminder before that date. Click Add.Copy the secret's Value immediately. It is shown only once. Do not copy the Secret ID beside it; that is a different thing and will not work.
Prepare work-account sign-in
Verify the callback before inviting employees to sign in with Microsoft. If you entered it when creating the registration in Step 1, it is already registered: do not add it again.
- In the same Empeiro app registration, open Authentication.
- Under Redirect URI configuration, expand Web and look for
https://empeiro.app/api/auth/microsoft/callback. For another installation, compare with the exact redirect URI shown by its Microsoft 365 page, including its hostname and path. If it is already listed under Web, this part is complete. Close any Add Redirect URI pane with Cancel and continue to step 4. - Only if the callback is missing, select Add Redirect URI (older portal: Add a platform), choose Web, enter the callback once, and select Configure or Save. The expected result is one matching entry under Web. Empeiro handles the authorization code on its server; this callback belongs under Web even though Empeiro also has a browser interface. See Microsoft's platform configuration instructions.
- Leave the implicit-grant Access tokens and ID tokens checkboxes unticked; this connection uses the authorization-code flow. In the Authentication preview, these controls are on the Settings tab. No second callback is required for directory sync or for linking your Microsoft account.
- Review Sign in with a work account for verification and linking an existing administrator account.
Which permissions are required, and why
These are application permissions: Empeiro reads the directory in the background without an
employee being present. They are separate from the openid profile email scopes requested when
an employee signs in. Selecting only a delegated User.Read.All row does not authorize hourly sync.
Microsoft explains the two permission types.
| Permission | Empeiro operation | If omitted |
|---|---|---|
| User.Read.All (application) | Read directory people, their eligibility/profile fields and available photos | The directory test/sync cannot operate. Required for this connection. |
| GroupMember.Read.All (application) | Read named security-group membership, including nested membership, for agent selection | Manual agent selection works; group-based selection cannot reliably update. The interface reports missing group access. |
| Organization.Read.All (application) | Read the tenant's name, Microsoft-verified domains and subscribed license names | Directory sync may work, but email-based SSO routing needs verified domains. License-name filtering may be less precise. Include it for SSO. |
openid, profile, email (interactive sign-in scopes) |
Return the signed-in identity to Empeiro | Work-account sign-in cannot complete without the necessary interactive consent. These scopes do not authorize tenant-wide directory work. |
The User.Read delegated row that the registration starts with is not Empeiro's directory-sync permission. No Mail.Read, Mail.Send, mailbox access, or calendar access is required by this setup. Do not add permissions merely because another application uses them. A permission can appear on the registration before consent is granted; verify the Granted for… status as well.
Official endpoint references: List users, transitive memberships, photos, and license names.
Step 2: enter the details in Empeiro
- In Empeiro, open Microsoft 365 in the menu on the left (administrators only).
- Paste the three values:
- Directory (tenant) ID → from the Overview page
- Application (client) ID → from the Overview page
- Client secret → the Value from step 8
- Check that both IDs came from the same registration in the intended tenant. After the security release is cleared, click Save and test. A successful test immediately runs the first real directory sync.

The steps sit right under the form; Full guide opens this page.
Empeiro stores the secret encrypted and never shows it again, only its last four characters. The form checks the two IDs look right before sending anything, then signs in to Microsoft with your registration and reads one person to prove the permissions work.
If the light turns green ("Test passed"), the first sync starts automatically. If it turns red, the message says what is wrong in plain words; see the table below, fix it, and the form stays open for corrections.

Connected: everything about the connection on one page.
What syncing does
- Sync now reads the whole directory. It also runs automatically every hour.
- Who is included: enabled member accounts with an email address. They come in as requesters, until you make them agents (below). A successful directory import does not by itself permit every imported employee to sign in.
- What is read: name, email, job title, department, photo, and security-group membership (including membership through nested groups). Nothing else, and nothing from anyone's mailbox.
- Who is left out: guests, disabled accounts and accounts with no email address are never read. Of the enabled accounts with a mailbox, two kinds are not people and are kept out too: accounts with no license (a heuristic that commonly excludes shared, room and equipment accounts; some real employees can also be unlicensed) and accounts whose only license is a Teams Rooms or shared-device license. They are listed under N accounts left out, each with an Include button in case the rule was wrong about one (a front-desk login, say). The other way round, Leave out beside a person keeps out an account the rule took for a person. Both decisions hold across every later sync.
- Telling a meeting room's license from a person's needs Organization.Read.All. Without it, Empeiro only knows "licensed or not": shared mailboxes are still left out, but a licensed meeting room comes in (use Leave out on it).
- Leavers: anyone the directory no longer lists leaves Empeiro on the next sync. Their tickets stay. Someone you also invited by name keeps their Empeiro account.
- Photos come from Microsoft 365. People whose mailbox is still on an on-premises Exchange server may have no photo; their initials show instead.
Every save, test and sync is written to the Recent activity list at the bottom of the page, with who did it; the whole log is Activity.
Who answers tickets
Beside the sync, Who answers tickets chooses a security group whose members are agents (an IT team, say), with anyone you mark as Agent by hand in the people list. Everyone else from the directory is a requester. Change the group's members in Microsoft 365 and Empeiro follows on the next sync. "Only people marked by hand" uses no group at all.
Groups that aren't security groups (a Microsoft 365 group for a team's mail, say) aren't offered.
Who can sign in
Connecting does not open Empeiro to the whole staff. Only these people uses one authoritative sign-in list for invited accounts and directory people. Invitations add people to the list automatically, and an administrator can untick them. Organization administrators are always allowed; an invited nonadministrator has no separate bypass.
- Only these people: tick Can sign in beside each person, then Save who can sign in.
- Everyone in the directory: opens access to the organization's included people. Imported employees remain requesters unless given support roles.
Select Save who can sign in after changing the scope or checkboxes. Read Not saved yet as a reminder that the selection is pending. Removing a nonadministrator from the saved list revokes their access, including existing sign-ins and live connections. Administrators must have their administrator role changed separately by another administrator before the list can restrict them.
Verify with a pilot employee before rollout
- Confirm the connection is green and read the latest successful sync summary. Inspect several actual employees for the correct name, email and department.
- Open accounts left out. An unlicensed employee may be excluded by the default license rule; choose Include for a real employee who should have access. Guests, disabled accounts and entries without email are not the same as excluded enabled employees.
- Keep Only these people selected initially. Add the authorized pilot employee and save the sign-in list.
- Ask that employee to use a separate browser session: Sign in → Use your work account (Microsoft 365) → work email → Microsoft sign-in.
- Confirm they land in the correct organization as a requester, can create a real agreed pilot ticket and can exchange a reply with IT Support. Check the ticket from the agent side too.
- Have the existing administrator use Link your Microsoft account from Your account to retain one account for both sign-in methods.
- When the pilot passes, select Everyone in the directory if the whole synced staff should submit tickets, and save. Imported employees remain requesters unless you explicitly grant support or administrator privileges.
Completion check: employees come from the intended real tenant, the included staff can sign in, a requester can submit a ticket, and IT Support can receive and answer it. A green connection test alone does not establish all four outcomes.
Microsoft reference documentation
These official references explain the Microsoft-side controls used above:
- Register an application.
- Configure a Web redirect URI.
- Grant tenant-wide admin consent.
- Organization properties and required application permissions.

The pilot: start with a few people, then everyone.
Verified domains and tenant ownership
Work-account routing accepts only domains returned by Microsoft as verified for this tenant. A person's email suffix alone does not claim a domain. The same tenant and verified domain cannot be claimed by two Empeiro organizations. If an intended email domain is missing, verify it in the correct Microsoft tenant and grant Organization.Read.All, then run Test or Sync now. Do not change an employee's address or create a replacement organization to bypass an ownership conflict. Ask support to resolve a legitimate tenant transfer.
Keeping it working
- The client secret expires on the date you chose. When it does, the light turns red with "Microsoft rejected Empeiro's app secret: it has expired." Make a new secret in Certificates & secrets, click Change details in Empeiro, paste the new Value (leave the IDs as they are) and Save and test.
- Test checks saved credentials and refreshes connection status and verified-domain routing; it does not run the full employee sync. Existing connections from an earlier release need a fresh successful Test or Sync now to establish the secured domain routing. Use Sync now to refresh people. Connections in error wait for an administrator to correct and retry them rather than repeatedly syncing every hour.
- Disconnect (at the bottom of the people list) forgets the connection and the people it synced. People you invited stay, and every ticket stays. Nothing changes in Microsoft 365: the app registration stays there until you delete it.
What automatic synchronization does and does not promise
The hourly interval runs in the application server, not your browser or a laptop scheduled task. The server must be running and its background sweep enabled. Each directory run follows all pages; it is a full read, not a Microsoft delta-query subscription. Microsoft directory changes can take time to appear, and the agent security-group query uses eventual consistency.
Guest, disabled and no-email accounts are rejected before inclusion decisions. Include can
override an unlicensed/device exclusion, but cannot turn a guest or disabled account into an
eligible member. If license names cannot be retrieved, unknown licensed SKUs are not guessed to
be device licenses; review included accounts and manually leave out any inappropriate identities.
Member eligibility uses Microsoft's mail value, not a guessed mailbox address from its UPN.
A failed complete directory read does not replace the existing directory with a partial page. Photo/group failures can leave the previous photo/group data in place; the sync message reports those exceptions. A connection in error is not automatically retried by directory sync until an administrator fixes it and selects Test or Sync now.
Directory removal/exclusion takes effect after a successful sync. Microsoft sessions for identities no longer synchronized are then rejected. A separately invited native account remains separately managed by the organization's administrators; remove its account or access when appropriate. Do not treat a failed sync, a Microsoft account disable, or the one-hour timer as instant universal revocation of every independent Empeiro password/passkey account.
Renew a secret without disrupting access
- Record the current registration's IDs and the existing secret's expiry in your password manager.
- Before expiry, create a replacement under Certificates & secrets → Client secrets. Keep the old credential valid while testing the replacement, where your tenant policy allows overlap.
- In this same Empeiro organization, select Change details, keep tenant/client IDs, paste the new Value, and select Save and test. This performs the normal first-sync behavior again.
- Check directory status and the resulting people count, then complete a work-account sign-in.
- Only then remove the old secret from Entra. Deleting an old secret in Entra is not done by Empeiro's form. Never paste the credential into Activity, a support ticket, or a screenshot.
Microsoft recommends certificate credentials for production and a client-secret lifetime below 12 months; tenant policy may be stricter. Empeiro currently supports encrypted client secrets, not certificate uploads or federated workload credentials. See Microsoft's credential guidance.
Continue through employee access
For a complete customer setup, follow this order:
- Register the app, set its Web callback for SSO, configure permissions and consent.
- Save/test/sync in the correct customer organization and review included/excluded people.
- Choose agents and the sign-in list; link the existing administrator's Microsoft identity.
- Test a listed employee's Microsoft sign-in and confirm an unlisted employee is refused.
- If you are bringing in ticket history, export it to CSV and follow Importing existing records: preview first, then import.
- Record credential renewal, source sync checks and offboarding exports in your admin procedure.

When something is wrong, the light says what.
Messages and what to do
| Message | Cause | What to do |
|---|---|---|
| This should look like 00000000-0000-… | An ID was pasted incompletely or with extra text. | Copy the ID again from the app's Overview page. |
| Enter the client secret (the Value from Certificates & secrets) | The secret box was empty on a first save. | Paste the secret's Value. |
| Microsoft rejected Empeiro's app secret. It may have expired. | Wrong secret, or the Secret ID instead of the Value. | Make a new client secret and paste its Value. |
| Microsoft rejected Empeiro's app secret: it has expired. | The secret's expiry date has passed. | Make a new client secret, Change details, paste its Value. |
| Empeiro's app isn't known in this organization. Check the Application (client) ID, and that an administrator has granted consent. | The client ID is wrong, or the registration is in a different tenant. | Check the Application (client) ID and the Directory (tenant) ID come from the same app's Overview page. |
| Microsoft doesn't recognize this organization (tenant). Check the Directory (tenant) ID. | The tenant ID is wrong. | Copy the Directory (tenant) ID from the Overview page. |
| Empeiro isn't allowed to read the directory. An administrator needs to grant consent. | Permissions were added but Grant admin consent was not clicked, or Delegated permissions were chosen instead of Application. | On API permissions, check the type says Application and click Grant admin consent. |
| Security groups couldn't be read (the GroupMember.Read.All permission isn't granted)… | Only User.Read.All was granted. People and photos still sync. | Add GroupMember.Read.All, grant consent, Sync now. Only matters if agents follow a security group. |
| Group membership couldn't be read for N people and was left as it was. | Microsoft throttled or had a passing error. | Nothing; the next sync retries. Known groups were kept. |
| N photo(s) couldn't be read and were left as they were. | A passing error, or a mailbox on an on-premises server. | Nothing; the next sync retries. |
| A stored secret couldn't be read with this server's key (the server may have been restored or moved). Enter the client secret again. | The server's encryption key changed, usually after a restore onto a new server. | Click Change details, paste the client secret's Value again, Save and test. |
| This server can't store a client secret… | A fault on Empeiro's side. | Contact support; nothing on your side needs changing. |
| The directory couldn't be reached: … | A network problem between the server and Microsoft. | Try Test again in a few minutes. |
| That Microsoft 365 tenant is already connected to another organization on Empeiro. | One tenant connects to one organization. | Contact support if this tenant should move. |