mirror of
https://github.com/plankanban/planka.git
synced 2026-02-05 00:39:58 +03:00
[Bug]: Azure OIDC sign in #902
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kasperB2004 on GitHub (Jan 25, 2026).
Where is the problem occurring?
I encountered the problem while using the application (Frontend)
What browsers are you seeing the problem on?
Microsoft Edge
Current behavior
When logging into planka with sso i get a error "Unkown error please try again later"
Desired behavior
To be able to sign in
Steps to reproduce
I currently set up Planka with the following OIDC configuration:
When signing in, I get a 422 Unprocessable Entity error on the following endpoint:
https://planka.xxx.be/api/access-tokens/exchange-with-oidc?withHttpOnlyToken=trueWith the response:
I saw that setting OIDC_CLAIMS_SOURCE to id_token could fix this issue with no luck.
My Azure API exposes the needed permissions aswell
Other information
No response
@meltyshev commented on GitHub (Jan 25, 2026):
Hi! The error you're seeing means that one (or even both) of the required fields are missing from the
userinforesponse or theid_token. We're planning to add more logging to help debug the entire OIDC process, since it's currently difficult to troubleshoot - we're aware of that.I also found a discussion about Azure that mentions the same error, it might be helpful: https://github.com/plankanban/planka/discussions/591#discussioncomment-9119995.
Additionally, we just merged a PR with an example configuration for Microsoft Entra ID, which may also help: https://docs.planka.cloud/docs/configuration/oidc#microsoft-entra-id.
If none of this helps, we can try to find a way to debug it - just please let us know which installation method you're using.
@kasperB2004 commented on GitHub (Jan 25, 2026):
Hi i installed it using docker and then followed along with said example configuration. I tried the solution listed in #591 by adding the email address in contact information but then i get a 500 instead of the 422. Looking at the logs it because of the following error
changing it to OIDC_USERNAME_ATTRIBUTE=oid as listed in the documentation under the group part of the entra sso documentation gave me the following error
@meltyshev commented on GitHub (Jan 26, 2026):
Ah, thanks for the logs! There are two ways to fix this:
nightlyversion until we release the final v2. In the currentrc.4the username length is limited to 16 characters, but we've already fixed that and made it less strict. Just keep in mind - it's better to switch back to thelatesttag after the final release, since relying onnightlylong-term isn't recommended (we're planning to release the final version very very soon).OIDC_IGNORE_USERNAME=true, so no username will be synced from the OIDC provider. You can then set or configure it directly inside PLANKA.@kasperB2004 commented on GitHub (Jan 26, 2026):
Hey, thanks for the quick response!
I got the nightly build working, but now I’m running into a 403 error: “Admin login required to initialize instance.”
I suspect I need to create a non-OIDC user first to set it up. However, it seems logical that using Azure groups and an admin group should achieve the same effect.
@meltyshev commented on GitHub (Jan 26, 2026):
It should have the same effect via OIDC. It looks like the role mapping isn't working properly because the required claim isn't coming from the provider, or a different value is being used - as a result, a simple
boardUserwas created. Maybe I can try building a command to run the container with a modified OIDC controller that just logs the incoming data...@kasperB2004 commented on GitHub (Jan 26, 2026):
Got it working. Seems i must have mis copied the group id. Thanks for the Help!
@meltyshev commented on GitHub (Jan 26, 2026):
You're welcome! Glad to hear it's working!