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.
- Navigate to https://portal.azure.com/
- Log in with your Microsoft Azure credentials if you are not logged in or create a new account.
- Click on the Search bar and search for “App registrations”.
- Click on “New registration”.
- Fill the “Name” field with your App Name.
- Choose “Personal Microsoft accounts only” from the Supported account types.
- Add the URL to the “Redirect URI” field.
- Create your App with the “Register” button.
- You land on the “Overview” page.
- Copy the “Application (client) ID”, this will be the Application (client) ID in the plugin settings.
- Click on the link named “Add a certificate or secret” next to the Client credentials label.
- Click on “New client secret”.
- Fill the “Description” field.
- Set the expiration date at the “Expires” field.
- Then create your Client Secret with the “Add” button.
- 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.
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.
Application (client) ID
The Application (client) ID of your Microsoft app. You can find it at your App’s Overview panel.
The Client Secret of your Microsoft app. You can find it at your App’s Overview panel.
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.