zorn-v / nextcloud-social-login

GNU Affero General Public License v3.0
197 stars 138 forks source link

Microsoft Oauth Username #476

Open ddaviscomsec opened 4 weeks ago

ddaviscomsec commented 4 weeks ago

I have created a custom Oauth for microsoft but when the account is created via furst login the Microsoft GUI is being used as the username. How can I get the email to be used as the username? Can this be included in the standard features?

Thanks!

zorn-v commented 3 weeks ago

No, username in nextcloud considered as user ID. Customizable of it is not possible intentionally due security issues. Use "display name claim" option.

ddaviscomsec commented 3 weeks ago

Ok I understand but when MS users authenticate and their account is created the MS GUI is used as their username and this creates an issue in identifying users easily in nextcloud as sometimes only user names are used on certain screens.

zorn-v commented 3 weeks ago

AFAIK display name is preferable in search/display and other things in nextcloud. So just figure it out how to use "display name claim" - it means "where I should find it in json response"

ddaviscomsec commented 3 weeks ago

I am able to add the user by their display name to a collective as seen below: Screenshot 2024-08-19 140253

But then when managing the users I can see only the username and not the display name: Screenshot 2024-08-19 140311

This is why I was asking if there is anyway for me to set the username.

ddaviscomsec commented 3 weeks ago

Sorry to bother with this but just want to know if it is possible.

Thank you for any assistance that can be provided.

zorn-v commented 3 weeks ago

Yep, probably in other apps it may brings some problems, but it will not changed. Thanks for understanding :smile: