Skip to content

Sign in with Microsoft

From version 3.8.3

This page describes behaviour available from client version 3.8.3. Sites on an earlier version do not have it yet.

From version 3.8.3, people can sign in with their work or school Microsoft account instead of their eBiz password. It is switched on per site under Site Settings > General > Sign in with Microsoft, and needs eBiz's Microsoft app set up on the server and the site's address registered with it (eBiz does both).

Linking an account

Microsoft sign-in only works for someone eBiz already knows. A person links their Microsoft account once:

  1. sign in to eBiz with email and password as usual;
  2. open their profile settings and, under Microsoft account, press Link Microsoft account;
  3. sign in to Microsoft when asked.

From then on, Sign in with Microsoft on the login page signs them in. They can Unlink it from the same place. One Microsoft account can be linked to one person on a site.

Trusted organisations

Under the same setting, an administrator can list trusted organisations by their Microsoft tenant ID. People from a trusted organisation do not need to link first: the first time they sign in with Microsoft they are matched by their email address to their eBiz account, and linked. eBiz never matches by email for organisations that are not listed, because an organisation's own Microsoft administrators can give any email address to their accounts.

The second factor

Where the site uses two-factor authentication, a Microsoft sign-in skips eBiz's second factor only when Microsoft says it checked one itself (multi-factor authentication in the person's organisation). Otherwise eBiz asks for its own code or passkey as after a password. The site's usage terms are asked for in the same way as after a password.

When it does not work

The login page explains what happened:

  • not linked yet: sign in with email and password, then link Microsoft from the profile;
  • cancelled or failed at Microsoft: try again or use the password;
  • not switched on for the site.

Someone whose eBiz account has been switched off cannot sign in with Microsoft either.

For eBiz: setting it up

  • The app's ID and secret are read from the server's environment, MICROSOFT_SIGNIN_CLIENT_ID and MICROSOFT_SIGNIN_CLIENT_SECRET. They are not kept in the code.
  • In the Azure app registration, add a redirect URI for each site address: https://<site address>/v3.8.3/api/login/microsoftCallback.
  • Only work and school accounts are accepted (Microsoft's "organizations" endpoint), with PKCE. The browser comes back to the login page with a one-time code that the page exchanges for the session; no session token is put in an address.