Skip to main content
Version: v0.15

Microsoft

In this tutorial, we'll be setting up Microsoft authentication for Conduit.
Before we begin, we'll need to create a Microsoft Application.

Creating a Microsoft Application

  1. Go to the Microsoft Application Registration Portal.
  2. Click on Add an app.
  3. Enter a name for your application and click Create application.
  4. Click on Generate New Password and copy the password.
  5. Click on Add Platform and select Web.
  6. Enter your Redirect URL and click Add URL.
  7. Click on Save.

Setting up the configuration

In order to log in via Microsoft provider you need to configure through the Admin Panel.**
Select the Microsoft provider and enter the following details:

  • Client ID: The Client ID of your Microsoft Application.
  • Client Secret: The Client Secret of your Microsoft Application.
  • Callback URL: The Callback URL of your Microsoft Application.

Authenticate with Microsoft

To begin authenticating with Microsoft you request a redirect url with the proper scopes

Request
curl --location --request GET 'http://localhost:3000/authentication/init/microsoft'
Response
{
"result": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=CLIENT_ID&response_type=code&redirect_uri=REDIRECT_URL&response_mode=query&scope=openid%20profile%20email&state=STATE"
}

Open a browser and navigate to the url returned to you from Conduit.
Now the /hook/authentication route has been triggered.
Once your browser has been redirected, your authentication has been completed.