Error openid provider: 404 Not Found with azure active directory #90

Closed
opened 2026-02-27 14:51:57 -05:00 by deekerman · 3 comments
Owner

Originally created by @fgionghi on GitHub (Sep 21, 2022).

Hi,
while trying to use azure as openid provider I'm getting the following error:
2022-09-21T09:29:00.599925016Z: ERROR ▶ openid/GetAllProviders 093 Error while getting openid provider azure: 404 Not Found

My vikunja config file is:

service:
  JWTSecret: "***"
log:
  level: "DEBUG"
auth:
  local:
    enabled: false
  openid:
    enabled: true
    redirecturl: https://vikunja.fbk.eu/auth/openid/
    providers:
      - name: azure
        authurl: https://login.microsoftonline.com/**/oauth2/v2.0/authorize
        clientid: **
        clientsecret: **

The authurl is what I found on azure in the Overview > Endpoints > OAuth 2.0 authorization endpoint (v2) section, and it has to be right because it is the same for every apps in my tenant (and I have other apps with that endpoint that are working). I also tried oauth v1 version.

The clientid is what azure called Application (client) id in the overview section.

For the clientsecret I firstly create a new client secret in the Certificates & secrets section then I tried bot the secret Value and the Secret ID.

On the web page I don't see any error or any attempts to redirect to the oauth auth url.

Since the error is not even find the provider I don't mention here redirect URI values. I think the error should be on the endpoint or clientid values.

Anyone has ever used azure AD as openid provider? Any suggestion? Thanks.

Originally created by @fgionghi on GitHub (Sep 21, 2022). Hi, while trying to use azure as openid provider I'm getting the following error: `2022-09-21T09:29:00.599925016Z: ERROR ▶ openid/GetAllProviders 093 Error while getting openid provider azure: 404 Not Found` My vikunja config file is: ``` service: JWTSecret: "***" log: level: "DEBUG" auth: local: enabled: false openid: enabled: true redirecturl: https://vikunja.fbk.eu/auth/openid/ providers: - name: azure authurl: https://login.microsoftonline.com/**/oauth2/v2.0/authorize clientid: ** clientsecret: ** ``` The `authurl` is what I found on azure in the `Overview > Endpoints > OAuth 2.0 authorization endpoint (v2)` section, and it has to be right because it is the same for every apps in my tenant (and I have other apps with that endpoint that are working). I also tried oauth v1 version. The `clientid` is what azure called `Application (client) id` in the overview section. For the `clientsecret` I firstly create a new client secret in the `Certificates & secrets` section then I tried bot the secret `Value` and the `Secret ID`. On the web page I don't see any error or any attempts to redirect to the oauth auth url. Since the error is not even find the provider I don't mention here `redirect URI` values. I think the error should be on the `endpoint` or `clientid` values. Anyone has ever used azure AD as openid provider? Any suggestion? Thanks.
deekerman 2026-02-27 14:51:57 -05:00
  • closed this issue
  • added the
    support
    label
Author
Owner

@kolaente commented on GitHub (Sep 21, 2022):

Vikunja uses the authurl to figure out all openid endpoints it needs. Therefore the endpoint should support a /.well-known/openid-configuration sub url.

For example, Gitlab provides these infos at https://gitlab.com/.well-known/openid-configuration - when setting up Vikunja to authenticate with Gitlab the authurl should be just https://gitlab.com and Vikunja will figure out the rest.

@kolaente commented on GitHub (Sep 21, 2022): Vikunja uses the `authurl` to figure out all openid endpoints it needs. Therefore the endpoint should support a `/.well-known/openid-configuration` sub url. For example, Gitlab provides these infos at `https://gitlab.com/.well-known/openid-configuration` - when setting up Vikunja to authenticate with Gitlab the `authurl` should be just `https://gitlab.com` and Vikunja will figure out the rest.
Author
Owner

@fgionghi commented on GitHub (Sep 22, 2022):

Ok, now I got another error. Before of that: isn't it a little ambiguous to call authurl what it's actually is the openid configuration issuer? I'm totally not an expert of oauth and openid but it seems those terms have specific meanings.

However now I can press the Login with authentik button, I get redirect to the auth page, I login and once back on vikunja I got a red box with Could not authenticate against third party.. The users on authentik exists and are assigned to the vikunja app.

On the console tab I see POST https://vikunja.fbk.eu/api/v1/auth/openid/authentik/callback 400 (Bad Request).
Thank you.

@fgionghi commented on GitHub (Sep 22, 2022): Ok, now I got another error. Before of that: isn't it a little ambiguous to call `authurl` what it's actually is the `openid configuration issuer`? I'm totally not an expert of oauth and openid but it seems those terms have specific meanings. However now I can press the `Login with authentik` button, I get redirect to the auth page, I login and once back on vikunja I got a red box with `Could not authenticate against third party.`. The users on authentik exists and are assigned to the vikunja app. On the console tab I see `POST https://vikunja.fbk.eu/api/v1/auth/openid/authentik/callback 400 (Bad Request)`. Thank you.
Author
Owner

@fgionghi commented on GitHub (Sep 22, 2022):

Ok, my fault. I had Could not authenticate against third party. error because I have a typo in the clientsecret. Tested also on azure and everything is working.
Thank you.

@fgionghi commented on GitHub (Sep 22, 2022): Ok, my fault. I had `Could not authenticate against third party.` error because I have a typo in the clientsecret. Tested also on azure and everything is working. Thank you.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vikunja-go-vikunja#90
No description provided.