SSO Integration Azure AD / Next-Auth

Hello Strapi Community,

I’m encountering an issue while implementing Single Sign-On (SSO) for my Front End application with Azure AD using the Microsoft provider in Strapi.

Primary Question:
Is an enterprise license required to configure SSO on the client side (not for the Strapi admin panel)? If yes, this might be the root cause of the issue I’m experiencing. However, if that’s not the case, I’ve provided additional details below explaining the problem I’m facing.

Packages:

  • Strapi Version: 4.13.3
  • Next-Auth Version: ^4.23.1

Issue Description:
After successfully obtaining an access token from Azure using Next-Auth, I’m unable to retrieve user data / JWT token from Strapi.

The endpoint I’m using to get this data is:
/api/auth/microsoft/callback?access_token=<token>

However, I receive the following error response:

{
    "data": null,
    "error": {
        "status": 400,
        "name": "ApplicationError",
        "message": "403 Forbidden",
        "details": {}
    }
}

Additional Questions:

  1. If an enterprise license is not required, are there any specific configurations needed on the Strapi side to allow this callback?
  2. Are there any known issues with the Microsoft provider in Strapi 4.13.3?
  3. Is there additional information I should provide in the API call?

If more details are required, please let me know, and I will provide them as soon as possible.

This topic has been created from a Discord post (1273377758998958093) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord