Provider – Microsoft

Microsoft Sample

Table of contents

How to enable Microsoft login in WordPress

1. Create a Microsoft App

To be able to log in via Microsoft you must create a Microsoft app first.

  1. Navigate to https://portal.azure.com/
  2. Log in with your Microsoft Azure credentials if you are not logged in or create a new account.
  3. Click on the Search bar and search for “App registrations”.
  4. Click on “New registration”.
  5. Fill the “Name” field with your App Name.
  6. Choose “Personal Microsoft accounts only” from the Supported account types.
  7. Add the URL to the “Redirect URI” field.
  8. Create your App with the “Register” button.
  9. You land on the “Overview” page.
  10. Copy the “Application (client) ID”, this will be the Application (client) ID in the plugin settings.
  11. Click on the link named “Add a certificate or secret” next to the Client credentials label.
  12. Click on “New client secret”.
  13. Fill the “Description” field.
  14. Set the expiration date at the “Expires” field.
  15. Then create your Client Secret with the “Add” button.
  16. Copy the “Client Secret Value”, this will be the Client secret in the plugin settings.

2. App setup

Once your Microsoft app is ready you’ll need to copy and paste the Application (client) ID and Client Secret Value to the Microsoft provider’s Settings tab. You can find the information at your Microsoft app’s Overview panel.

3. Verifying

Once your Application (client) ID and Client Secret Value has been added you need to verify the setup first. This verification helps you identify possible problems with the app.

Settings

Microsoft Provider Configuration

Application (client) ID

The Application (client) ID of your Microsoft app. You can find it at your App’s Overview panel.

Client Secret

The Client Secret of your Microsoft app. You can find it at your App’s Overview panel.

Microsoft other settings

Username prefix on Register

Whenever a new user registers with their Microsoft account they can get a custom prefix so you can easily identify them.

Fallback username prefix on register

Whenever a new user registers with their Microsoft account and we can not generate a valid username from the first name or last name, a random username will be generated. With this option they can get a custom prefix so you can easily identify them.

Terms and conditions

This option can only be seen, if Terms and conditions is set to Show in Global Settings → Privacy tab. Here you can set custom Terms and Conditions for users who register with Microsoft. For more information please read our GDPR documentation.

Common error messages returned by Microsoft during verification

client_id is incorrect

unauthorized_client: The client does not exist or is not enabled for consumers.

The Application (client) ID you copied from the Microsoft app is invalid. Make sure the correct one was copied.

client_secret is incorrect

Error: invalid_client: CODE: Invalid client secret is provided.

The Client secret you copied from the Microsoft app is invalid. Make sure the correct one was copied.