Running the service
Sign-in providers
Signing in with Microsoft Entra ID or another OpenID Connect provider, who gets an account, where their roles come from, and what an app registration needs.
A sign-in provider lets people sign in to the dashboard with the account they already have: Microsoft Entra ID, or any provider that speaks OpenID Connect, such as Okta. The sign-in runs on the server. The provider’s tokens never reach the browser, and a sign-in ends in a ContactMesh session like a password’s, listed, limited and ended as Accounts and roles describes.
Providers are on Access › Sign-in, in Password and EntraId mode. Adding, changing, testing and
turning one on or off is sign-in.manage’s; reading them is accounts.read’s.
Adding a provider
Section titled “Adding a provider”Add provider asks for:
| Field | What it is |
|---|---|
| Kind | Microsoft Entra ID, or OpenID Connect |
| Button label | What the sign-in form’s button says: Sign in with and the name |
| Short name | The provider’s name in addresses, made from its name: lowercase letters, digits and hyphens |
| Redirect URI | Shown, to copy into the provider: https://<dashboard>/api/auth/oidc/<short name>/callback |
| Directory (tenant) ID | Entra: the directory the app registration is in |
| Issuer address | OpenID Connect: the provider’s issuer, or its /.well-known/openid-configuration |
| Client ID, Client secret | The application at the provider |
| New accounts | Who gets an account at their first sign-in; see below |
| Second factor | What a sign-in has to show of one; see below |
| Authentication context | Entra: what a step-up asks for; see below |
| Further scopes | Asked for beside openid profile email |
| Claims | OpenID Connect: the claims naming the subject, the name, the address and the groups |
The redirect URI is built from the dashboard’s address, Web__Origin, so set that first. The client
secret is sealed with the deployment’s protection key and never shown again; left empty when a provider
is changed, it stays as it was. A provider’s address has to be HTTPS, except on a demo or test stack
running the in-memory Graph fixture.
Test, in the row’s menu, reads the provider’s discovery document and signing keys, and asks it for a token with the client ID and secret. A provider that hands no such token to a web application says so, and the credentials are then Not checked: only a sign-in shows them right.
Microsoft Entra ID
Section titled “Microsoft Entra ID”The app registration needs, in the Microsoft Entra admin centre:
- Authentication › Add a platform › Web, with the redirect URI the provider’s dialog shows.
- Certificates & secrets › New client secret, whose value goes into Client secret. A secret expires: replace it before it does. Test fails on Client ID and secret once it no longer works.
- Token configuration › Add optional claim › ID ›
amr, so a sign-in says how the person proved themselves. Without it every sign-in is refused while Second factor is Required. - The app roles
ContactMesh.Viewer,ContactMesh.OperatorandContactMesh.Admin, as the dashboard’s registration has them, assigned to people or to groups. - For groups: Token configuration › Add groups claim › Groups assigned to the application, in the ID token as the group ID, and the groups assigned to the application under Enterprise applications › Users and groups.
Conditional Access decides the second factor: a policy requiring multifactor authentication for the
ContactMesh application, which needs Microsoft Entra ID P1. For a step-up, create an authentication
context (c1 to c99), a policy for it requiring multifactor authentication with a sign-in frequency
of Every time, and put the context’s ID into Authentication context. Without one, a step-up asks
for a fresh sign-in at Microsoft.
Somebody in more than 200 of the groups assigned to the application gets no groups in the token. ContactMesh
then asks Microsoft Graph for them — only while a group on Access › Groups is one of the provider’s —
with the delegated permission GroupMember.Read.All, granted with admin consent and added to Further
scopes. When Graph refuses, the sign-in is refused with a sentence saying so.
The directory has to be in Microsoft’s global cloud.
An EntraId deployment after the upgrade
Section titled “An EntraId deployment after the upgrade”A deployment in EntraId mode signs in as it did, with the dashboard’s tokens, for this release. Every
answer to such a token carries a Deprecation header, and the API says at start (event 2011) that the
path is going. To move:
- Add the Web redirect URI and a client secret to the dashboard’s app registration, as above. Its app roles stay.
- Sign in as before, as an Admin, and add Microsoft Entra ID on Access › Sign-in with the same directory and client ID.
From then on the sign-in form offers the provider’s button, and everybody signs in through the server and
gets an account at their first sign-in, as below. The registration’s single-page application platform and
the ContactMesh.Access scope it exposes can go once the token path does, in the next release.
Other OpenID Connect providers
Section titled “Other OpenID Connect providers”The issuer address, the client ID and secret, and the names of the claims where they are not the
standard’s: sub, name and email, and groups for the groups. Okta sends groups when the groups
scope is among Further scopes and its authorization server has a groups claim. Google sends neither groups
nor amr, so a Google provider’s Second factor is Trusted, and its people get their
roles from their accounts or from local groups.
Who gets an account
Section titled “Who gets an account”An account is found by the provider, the issuer and the subject — Entra’s object ID — and never by an address, so an unchecked address at one provider never signs anybody in as somebody else. A person’s first sign-in makes an account as New accounts says:
- Role holders only, the default: an app role, or a group of the provider’s that holds a role here, gives them something. Anybody else is refused, and the refusal is on the audit log.
- Everyone: everyone who signs in gets an account that holds nothing until somebody gives it a role.
The account is named after the address or sign-in name the provider gives, with the provider’s short name after it when an account has that name already. It has no password: a password sign-in, a password reset and a second-factor reset are refused for it, and Access says where it signs in. Every sign-in brings its display name and address up to date.
Where their roles come from
Section titled “Where their roles come from”- App roles in Entra give the built-in role across the deployment for as long as the session runs. They are not assignments here and are not taken away here: a role removed in Entra is gone at the next sign-in.
- A group of the provider’s, on Access › Groups: New group, Members from the provider, and the group’s ID there — an Entra group’s Object ID, or what the groups claim sends. It holds roles across the deployment or in one tenant, as a local group does. Its members are whoever the provider says at their sign-in, so nobody is added or taken out here, and its provider and ID stay as the group was made. Its page lists the accounts whose last sign-in put them in it.
- Roles given here, to the account or a local group, as for anybody.
A change to what a group holds reaches its people at their next request; a change at the provider, at their next sign-in. A session keeps only those of the provider’s groups that a group here names.
Second factors
Section titled “Second factors”ContactMesh asks nobody who signs in through a provider for a second factor of its own. Second factor says what the provider has to show:
- Required, the default: the token’s
amrnamesmfa. Otherwise the sign-in is refused, telling the person to ask an administrator to require one there; the audit log says whetheramrwas missing or named something else. - Trusted: the provider is trusted to ask for one, and nothing is checked.
A sensitive change from such a session asks for a fresh sign-in at the provider, in a window of its own — through the authentication context, where one is set — and carries on once it is done. A sign-in there as somebody else renews nothing.
Passwords beside the providers
Section titled “Passwords beside the providers”The sign-in form offers every provider that is offered at sign-in, and the password while local accounts
sign in with one. Password sign-in on Access › Sign-in can keep the password for break-glass
accounts: enabled Admin accounts with a password, marked Break-glass account on their Edit, which
get in when the provider cannot. It needs a provider that is on and one such account, and while it holds,
the last one is not unmarked, switched off, demoted or deleted. Anybody else’s right password is refused
with a sentence pointing at the provider’s button, and the form keeps the password behind Sign in with a
break-glass account. reset-access marks the account it restores as break-glass while the limit holds.
Turning a provider off, and deleting it
Section titled “Turning a provider off, and deleting it”Turning a provider off takes its button off the form and ends every session it began, at their next request. A provider is deleted only when no account signs in through it and no group is its; until then, turn it off.
On the audit log
Section titled “On the audit log”Every sign-in through a provider, let in or refused, is an event of its own, Signed in through a provider, naming the provider, the methods it reported, the app roles and the groups; a step-up is Confirmed at a provider. A refusal names its reason: no role awaits, no second factor at the provider, groups not readable from Microsoft Graph, a sign-in expired or cancelled, a token refused or not checking out.