Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft Azure Identity provider SSO Integration with Directus not working #13135

Closed
AmirEzati opened this issue May 5, 2022 · 0 comments
Closed

Comments

@AmirEzati
Copy link

AmirEzati commented May 5, 2022

Describe the Bug

I have tried to employ Microsoft AD as identity provider for Directus but have failed to do so.
The authentication with my microsoft account is done successfully each time, but Directus never allows the account to get into the service.
Different versions of Directus package were also installed but no luck yet.

To Reproduce

  • Install Directus via npm and open the project with a code editor.

  • place the below key/value pairs in the .env file

AUTH_PROVIDERS="microsoft"
PUBLIC_URL= "http://localhost:8055"
AUTH_MICROSOFT_DRIVER = "openid"
AUTH_MICROSOFT_CLIENT_ID = "from Azure"
AUTH_MICROSOFT_CLIENT_SECRET = "from Azure"
AUTH_MICROSOFT_ISSUER_URL = "https://login.microsoftonline.com/{tenantId}/v2.0/.well-known/openid-configuration"
AUTH_MICROSOFT_ALLOW_PUBLIC_REGISTRATION="true"
AUTH_MICROSOFT_DEFAULT_ROLE_ID="{an_available_role_id}"
AUTH_MICROSOFT_ICON="microsoft"
AUTH_MICROSOFT_IDENTIFIER_KEY = "sub" // tried with email or upn as well
AUTH_MICROSOFT_SCOPE="openid profile email"

Errors Shown

over the address bar I get: http://localhost:8055/admin/login?reason=SERVICE_UNAVAILABLE
in terminal I get the below error messages:
**- OPError [OpenID] Unknown OP error

  • Service returned unexpected response
  • Auth provider not configured
  • request errored POST 503 /auth/refresh**

and when I try to call the callback url directly on the addressbar to see some output:
in the address bar: http://localhost:8055/auth/login/microsoft/callback?code={the code from azure}
the error shown:
{"errors":[{"message":"Invalid user credentials.","extensions":{"code":"INVALID_CREDENTIALS"}}]}

What version of Directus are you using?

9.10.0

What version of Node.js are you using?

16.14.0

What database are you using?

Postgres 14

What browser are you using?

Chrome

How are you deploying Directus?

running locally

@directus directus locked and limited conversation to collaborators May 5, 2022
@azrikahar azrikahar converted this issue into discussion #13137 May 5, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant