This project is part of the Drupal Social Initiative and is based on the Social API.

Social Auth Microsoft allows users to register and login to your Drupal site with their Microsoft account. It is based on Social Auth and Social API projects

This module adds a path user/login/microsoft which redirects the user to Microsoft Accounts for authentication.

After Microsoft has returned the user to your site, the module compares the user id or email address provided by Microsoft. If your site already has an account with the same email address or the user has previously registered using Microsoft, the user is logged in. If not, a new user account is created. Also, a Microsoft account can be associated with an authenticated user.

Login process can be initiated from the "Microsoft" button in the Social Auth block. Alternatively, site builders can place (and theme) a link to user/login/microsoft wherever on the site.

Configuration

In Drupal

  1. Log in as an admin.

  2. Navigate to Configuration » User authentication » Microsoft and copy
    the Authorized redirect URL field value (the URL should end in
    /user/login/microsoft/callback).

In Azure Portal

  1. Log in to a Microsoft account.

  2. Navigate to App registrations

  3. Click Register an application.

  4. Set the app name and account type as desired.

  5. Under Redirect URI select "Web" from the platform options and paste the
    URL from Step 2 in the field.

  6. Click Register.

  7. On the app Overview page copy the Application (client) ID value and store
    it somewhere safe.

  8. Navigate to Certificates & secrets » Client secrets.

  9. Click New client secret.

  10. Set the fields as desired and click Add.

  11. Copy the secret (in the Value column, not the Secret ID column) and
    store it somewhere safe.

In Drupal:

  1. Return to Configuration » User authentication » Microsoft.

  2. Enter the Microsoft client ID in the Client ID field.

  3. Enter the Microsoft secret value in the Client secret field.

  4. Click Save configuration.

  5. Navigate to Structure » Block Layout and place a Social Auth login block
    somewhere on the site (if not already placed).

Supporting organizations: 

Project information

Releases