Skip to content

Microsoft

Members sign in with a Microsoft account — personal, work or school, depending on how you register the app. Sign-in happens in the system browser.

ConsoleAzure portal, App registrations
Endpoint groupSocial Login
EmailReturned, but not verified — cannot match an existing account
Signs inIn the browser
  1. Open App registrations in the Azure portal and choose New registration.

  2. Name it with something your members will recognise on the consent screen.

  3. Choose who can sign in. This is the decision that matters:

    • Accounts in any organizational directory and personal Microsoft accounts is what most communities want. Leave the tenant field in Memberside empty.
    • Accounts in this organizational directory only limits sign-in to your organization. You will need the Directory (tenant) ID.
  4. Set the Redirect URI, platform Web: the address from Memberside → API Keys → Social Login → Microsoft, which looks like https://yoursite.com/wp-json/memberside/v1/social/callback/microsoft.

  5. Copy the Application (client) ID from the Overview page.

  6. Create a client secret under Certificates & secrets → New client secret, and copy the Value — not the Secret ID.

  7. Note the expiry you chose. Microsoft secrets expire, at most in two years. Sign-in stops on that date with no warning.

The registration needs openid, profile, email and User.Read, which are delegated permissions granted without an administrator’s approval. Memberside asks for exactly those.

Some guides suggest adding Contacts.Read. Do not — it forces administrator consent in many tenants, and sign-in then fails for every member whose organization has not approved it.

Why the email cannot match an existing account

Section titled “Why the email cannot match an existing account”

New members can still register through Microsoft. It is only the matching of an address to an account that already exists which is refused.

Under Memberside → API Keys → Social Login → Microsoft:

FieldValueRequired
Client IDThe Application (client) IDYes
Client secretThe client secret ValueYes
Directory (tenant) IDOnly for a single-organization registrationNo

Leave the tenant field empty for a multi-tenant app; sign-in then goes to Microsoft’s shared endpoint, which is what lets personal accounts through.

SymptomCauseFix
Sign-in stopped working on a specific dateThe client secret expiredCreate a new one and paste it
“The client secret is invalid”The Secret ID was pasted instead of the ValueCopy the Value column
Personal accounts are refusedThe registration is single-tenantRe-register for any directory and personal accounts, or accept the limit
“Need admin approval”A scope beyond sign-in was addedRemove it
A second account is created for an existing memberMicrosoft’s email is unverified, so matching is refusedHave them sign in first, then link