Open quenenni opened 7 months ago
Bumpy bump.
Can someone point me to the right file/function where the test between the current name and the one received in the token are analyzed?
I have a similar issue but I am using keycloak directly (without LDAP behind it). In the log "reqId": ...
also shows me the updated displayname, but it never gets changed (even after logging off/on).
Another thing that I noticed is when I use the OCS API to query the changed user, the following is displayed:
{
"ocs": {
"meta": {
"status": "ok",
"statuscode": 100,
"message": "OK",
"totalitems": "",
"itemsperpage": ""
},
"data": {
"enabled": true,
"storageLocation": "/var/www/html/data/07c95427-25d2-41f5-951b-f327809836b4",
"id": "07c95427-25d2-41f5-951b-f327809836b4",
...
"backend": "user_oidc",
"displayname": "New Name",
"display-name": "New Name",
...
"backendCapabilities": {
"setDisplayName": false,
"setPassword": false
}
}
}
Noticed the part about backendCapabilities->setDisplayName->false
.
Yet another thing I noticed is that the code to change the displayname is indeed triggered:
{"reqId":"xxx","level":0,"time":"2024-07-01T21:37:07+00:00","remoteAddr":"xx.xx.xx.xx","user":"--","app":"user_oidc","method":"GET","url":"/apps/user_oidc/code?state=xxx&session_state=xxx&iss=https%3A%2F%2Fauth.xxx.com%2Fauth%2Frealms%2Fmyrealm&code=xxx","message":"Displayname mapping event dispatched","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0","version":"28.0.6.1","data":{"app":"user_oidc"}}
Hi, are you still able to reproduce this on the latest Nextcloud and user_oidc versions? If so, we'll try to find time to reproduce and maybe fix this.
@edward-ly My last understanding was - and this is true also in the latest version - that "Displayname" is not changeable for users provisioned by user_oidc
. This is why I now create the users "by hand" and use existing users with user_oidc
.
Can confirm that the bug still exists. I am on Nextcloud 29,0.8 and display names are not updated from the OIDC provider.
The displayname does not get updated in both the tables oc_accounts
and oc_user_oidc
when changed in Authentik.
With the logging level set to debug I can also confirm the display name change being triggered, the message Displayname mapping event dispatched
is written to the logs.
Hello,
Since I upgraded the user_oidc app from v1.3.2 to v5.0.2, the displayname is not updated anymore in Nextcloud profil if it is modified in our Ldap. The modification of the mail address or adding/removing a group in the LDAP are still working fine.
Our Nextcloud is still in v25.0.6 (we are planning to update it, but first we updated the applications and this problems needs to be resolved before going on)
In the nextcloud log, I can see it has the correct new display name:
The
,\"name\":\"<CORRECT NEW DISPLAYNAME>\"
shows the right new value and name is the correct mapped attribute name.I checked in the DB and I found the old display name in 3 tables:
I modified manually the value in the tables oc_user and oc_user_oidc without any change in the cloud interface. I modified the value in oc_accounts and it changed in the cloud interface.
But any of these values are updated when I modified a display name in the Ldap and logout / login in the cloud.
The user_oidc config in the Db :
And I added today these 2 settings in nextcloud config.php file, but I don't think they are needed. And nothing changed.
Any idea where that could come from?
Thank you