apicurio-registry: Microsoft Entra login - 401
Description
Login with Microsoft Entra doesn’t work.
- The redirect URI is now set to
<base-url>/explore, even though our configuration (APICURIO_UI_AUTH_OIDC_REDIRECT-URI) doesn’t contain/explore - After attempting to log in, a 401 error is returned. The UI displays the following error:
{
"responseHeaders": {
"cache-control": [
"no-cache",
" no-store",
" must-revalidate"
],
"content-length": [
"0"
],
"date": [
"Thu",
" 12 Jun 2025 05:37:01 GMT"
],
"expires": [
"Wed",
" 11 Jun 2025 05:37:01 GMT"
],
"pragma": [
"no-cache"
],
"strict-transport-security": [
"max-age=31536000; includeSubDomains"
],
"www-authenticate": [
"Bearer"
]
},
"responseStatusCode": 401
}
The login flow works correctly in version 3.0.7 with the same configuration.
Registry Version: 3.0.9 Persistence type: postgresql
Environment
Configuration:
# registry
QUARKUS_OIDC_TENANT-ENABLED: 'true'
QUARKUS_HTTP_CORS_ORIGINS: "*"
APICURIO_AUTH_ROLE-BASED-AUTHORIZATION: 'true'
QUARKUS_OIDC_ROLES_ROLE-CLAIM-PATH: roles
APICURIO_AUTH_ANONYMOUS-READ-ACCESS_ENABLED: 'true'
APICURIO_STORAGE_KIND: sql
APICURIO_STORAGE_SQL_KIND: postgresql
QUARKUS_OIDC_CLIENT-ID: <client-id>
QUARKUS_OIDC_AUTH-SERVER-URL: https://login.microsoftonline.com/<tenant-id>/v2.0
APICURIO_UI_AUTH_OIDC_CLIENT-ID: <client-id>
APICURIO_UI_AUTH_OIDC_REDIRECT-URI: https://<base-url>
# ui
REGISTRY_API_URL: https://<base-url>/apis/registry/v3
Steps to Reproduce
- Open the Registry UI.
- Attempt to log in using a Microsoft account.
- Wait for the redirect to Apicurio.
Expected vs Actual Behaviour
Expected:
- Successful login with Microsoft Entra.
- Redirect URI should respect the configured value (should NOT add
/explore).
Actual:
- Login fails with a 401 error and the redirect URI is not as configured.
Logs
Thank you for looking into it.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 30 (29 by maintainers)
@w1nsid fixed in:
Amazing how much easier it is when you already know exactly what is wrong and how to fix it. 🥇
@krystofrezac That’s bad news about lack of wildcards for redirects in Entra. 😦 If that becomes a problem for you, could you open a new GitHub issue about it and we’ll get it fixed?
I’ve created a PR to update the documentation so it’s easier for others to set up MS auth.
https://github.com/Apicurio/apicurio-registry/pull/6344
That’s perfect, thanks @krystofrezac - I’ve reproduced the issue locally using your configuration. I’ll look into this first thing on Monday and report back. Hopefully it’s OK if you leave that Entra tenant up and running for a little bit. I don’t otherwise have access to Entra.
I’ve tried creating a brand-new application in Microsoft Entra, and I get the same results (including the warning in jwt.io). So it’s probably not a mistake on Microsoft Entra’s side