-
Notifications
You must be signed in to change notification settings - Fork 32
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
Azure AD: Undefined array key in /var/www/app/plugins/OAuth2/User/GenericOAuth2UserProvider.php #36
Comments
Same issue with Keycloak 18. |
Same issue with Azure AD and same settings as above except the callback URL Has anyone been able to get it working with AzureAD? |
Same issue with Authelia:
That's the only error thrown regardless of the configuration for the Configuration:Callback URL: https://kanboard.example.com/?controller=OAuthController&action=handler&plugin=OAuth2 Allow Account Creation: Checked Please let me know if any other information is required, I can atleast confirm that OIDC works for my other applications e.g. Portainer. |
I'm getting the same error as @yash-ahir while using Authentik. |
If you're tweaking your configuration as you try to connect, remember to close and re-open a private browsing session and use a clean URL before retrying to connect. I had the exact same issue as OP (with Azure AD) even though my settings were right. In a clean environment I was able to connect. |
I found a workaround to this problem
Works using Authentik 2023.06 |
I needed to change the User API URL from:
to:
|
I had the same issue with Azure AD due to using the wrong (v1) endpoints, had to switch to the v2 endpoints to make it work. |
this is the right endpoint and this works. Doc may be updated |
Actual behaviour
External authentication failed and Warning: Undefined array key "id" in /var/www/app/plugins/OAuth2/User/GenericOAuth2UserProvider.php on line 266 is thrown when using Azure AD as identity provider.
GitHub auth works as intended - Likely something not supported in GenericOAuth2UserProvider.php for Azure AD?
Expected behaviour
Authentication is successful
Steps to reproduce
Add following config in OAuth2 Plugin:
Callback URL: https://kanboard.domain.com/oauth/callback
Client ID: *******************
Client Secret: ********************************
Authorize URL: https://login.microsoftonline.com/common/oauth2/authorize
Token URL: https://login.microsoftonline.com/common/oauth2/token
User API URL: https://graph.microsoft.com/beta/me
Scopes: User.Read or openid (happens regardless of scope)
Username Key: userPrincipalName
Name Key: displayName
Email Key: mail
User ID Key: id (Undefined array key always thrown regardless of value here)
Allow Account Creation: Any
Allow account creation only for those domains: Empty
Groups Key: Empty
Group Filter: Empty
Configuration
docker-compose.yml
version: '2'
services:
kanboard:
image: kanboard/kanboard:latest
ports:
- "9443:80"
volumes:
- ./kanboard_kanboard_data/_data:/var/www/app/data
- ./kanboard_kanboard_plugins/_data:/var/www/app/plugins
- ./config.php:/var/www/app/config.php
config.php:
config.php.txt
The text was updated successfully, but these errors were encountered: