Logging in with Microsoft
Members log in with their Microsoft account: a personal one, such as Outlook.com, Hotmail or Xbox, or one from their work or school on Microsoft 365. Setting it up takes about fifteen minutes: an app in the Microsoft Entra admin center, the certificate of your site uploaded to it, its client ID in Poly Community, turning it on, then a test.
You need:
- A Microsoft Entra directory to make the app in. A personal Microsoft account alone cannot make one: the portal says The ability to create applications outside of a directory has been deprecated. You may get a new directory by joining the M365 Developer Program or signing up for Azure. A free Azure account, made with your Microsoft account, comes with a directory. Microsoft asks for a phone number and a card for it. Apps for logging in cost nothing.
- Your site on https, with pretty permalinks. Microsoft takes no address with a query string for personal accounts, as the redirect URI of a site with plain permalinks has.
How single sign-on works for every provider, and what each setting does, is on Single sign-on.
1. Copy the redirect URI
- In WordPress, go to Poly Community → Settings → Services → Single sign-on.
- Press Set up on the Microsoft row.
- Copy the Redirect URI at the top of the dialog, such as
https://example.com/wp-json/wordplus/v1/sso/back.
Leave the dialog open. Make the app in it opens the Microsoft Entra admin center.
2. Register the app
-
Open the Microsoft Entra admin center, go to Entra ID → App registrations and press New registration.
-
For Name, enter the name of your community. Microsoft shows it to members when they log in.
-
Under Supported account types, choose who may log in. Each choice has its Tenant in WordPress, in step 6:
Supported account types Tenant in WordPress Any Entra ID Tenant + Personal Microsoft accounts commonMultiple Entra ID tenants (work and school accounts only) organizationsPersonal accounts only consumersSingle tenant only, your own organization its Directory (tenant) ID -
Under Redirect URI, choose Web and paste the redirect URI from step 1.

Microsoft Entra admin center → App registrations → New registration -
Press Register. The Overview page of the app shows its Application (client) ID, and its Directory (tenant) ID for a single tenant.

App registrations → the app → Overview
3. Add the email claims
So that Microsoft gives the email address of a member and says whether it vouches for it:
- In the app, go to Token configuration and press Add optional claim.
- For Token type, choose ID, tick email and xms_edov, and press Add.
- Microsoft asks to Turn on the Microsoft Graph email permission. Tick it and press Add.

xms_edov says that the organization of a work or school account verified the domain of its address. Poly Community takes the address as confirmed only then, as Microsoft advises never to trust the email claim alone. Microsoft sends it for work and school accounts only, as the list says, so a personal account is never confirmed by Microsoft. See What Microsoft gives your site.
4. Upload the certificate of your site
The app needs a credential to prove that a login comes from your site. Poly Community makes a certificate for it, valid for twenty years: the site keeps its private key, and you upload the certificate, which is not secret, to the app. A client secret works too, but Microsoft ends it within two years (see A client secret instead).
-
In the dialog in WordPress, press Make a certificate, then Download. Your browser saves a file named like
example.com-microsoft.pem. -
In the app, go to Certificates & secrets, then Certificates, and press Upload certificate. Choose the file, give it a Description, such as the address of your site, and press Add.

App registrations → the app → Certificates & secrets → Certificates → Upload certificate Microsoft lists it with its thumbprint and the date it expires, twenty years on.

Certificates & secrets → Certificates
Make a new one in the dialog makes a new certificate in place of the old one. Logging in with Microsoft then fails until the new certificate is uploaded to the app, so upload it right away, then delete the old one from the app.
5. Enter the keys
-
Back in the dialog in WordPress, fill in:
- Client ID: the Application (client) ID from the Overview.
- Tenant: the one the table in step 2 gives for the account types you chose.
Leave Client secret empty: the certificate takes its place.

Settings → Services → Single sign-on → Microsoft -
Decide who may use it with Let new people join with it. See Let new people join with it.
-
Press Save the provider. The Microsoft row now says Set up and Off: members do not see it yet.
6. Turn it on
- Press Turn it on on the Microsoft row, which opens Settings → Joining → Logging in.
- Turn Microsoft on with its switch, and press Save changes.
Continue with Microsoft now shows on the login form of the community and on the WordPress login screen. With Let new people join with it on, it shows on the sign-up forms too.

7. Try it
- In a private window, open the login page of your site and press Continue with Microsoft.
- Log in with a Microsoft account. The first time, Microsoft asks to accept the app, with the name you gave it.
- You are back on your site. A member is logged in, someone new is on the sign-up form, and anything else lands on the login page with a line that says why.
To try it with your own account, log in with your password, open your account settings, and press Connect beside Microsoft under Connected accounts.
A client secret instead
If your server cannot make a certificate, the dialog says so, and a client secret does the same work. Microsoft ends a client secret on the date you choose, two years at most, and on that day nobody can log in with Microsoft until a new one is entered.
-
In the app, go to Certificates & secrets, then Client secrets, and press New client secret.
-
Enter a Description, such as the address of your site, and choose when it Expires. Microsoft recommends 180 days and allows 730 days at most.

App registrations → the app → Certificates & secrets → New client secret -
Press Add, and copy the Value now. Microsoft shows it only on this page, and never again. Copy the Value, not the Secret ID beside it.

Certificates & secrets → Client secrets -
Paste it under Client secret in the dialog in WordPress, and press Save the provider.
Write down when the secret expires. Before that day, make a new secret the same way, enter its Value in WordPress, then delete the old one. With a certificate made on the site, the client secret is not used.
People from other organizations
The Overview of a new app that takes accounts of other organizations shows: End users cannot grant consent to newly registered multitenant apps without verified publishers. Microsoft documents that rule for apps that ask for more than signing in and reading the basic profile, which is all Poly Community asks for, so members should not meet it. Their own organization may still ask for an administrator to approve apps. If someone is asked for that, an administrator of their organization approves the app, or you verify yourself as its publisher: Add MPN ID to verify publisher on the Overview, with the ID of a Microsoft partner account.
What Microsoft gives your site
The ID of the account, the name and the email address. Poly Community takes the address as confirmed only when Microsoft says the organization of the account verified its domain (xms_edov). So:
- A work or school account of an organization that verified its domain joins and is matched by its address like a Google account.
- A personal account is never confirmed by Microsoft. Someone new confirms the address with a code on the sign-up form. A member who already has an account with that address logs in to it once, and Microsoft is connected from then on. See An account that already has the address.
Microsoft gives no picture.
When something goes wrong
Microsoft says the redirect_uri is not valid
Microsoft shows invalid_request: The provided value for the input parameter redirect_uri is not valid. The expected value is a URI which matches a redirect URI registered for this client application. The redirect URI of the app is not exactly the one in WordPress. In the app, go to Authentication and compare its Web redirect URI with the dialog: the same https, the same www or none, no slash at the end.
Microsoft says the client does not exist
Microsoft shows unauthorized_client: The client does not exist or is not enabled for consumers. Either the Client ID in WordPress is not the Application (client) ID of the app, or the app does not take personal accounts, under Supported account types, while the Tenant in WordPress lets them in. Check both against the table in step 2.
The login comes back with "Microsoft could not be reached, or its answer could not be checked"
Microsoft did not take the proof of your site. With a certificate: it is not uploaded to the app, or a new one was made and not uploaded yet. Download it from the dialog and upload it (step 4). With a client secret: it is wrong, is its Secret ID instead of its Value, or has expired. Services → Single sign-on shows the failure with the words of Microsoft.
Anything else
A Forbidden page from your host right after Microsoft, a login that always says it took too long, or a button that does not show: these happen with every provider and are on Common problems.