nextcloud / user_oidc

OIDC connect user backend for Nextcloud
GNU Affero General Public License v3.0
88 stars 35 forks source link

Ability to convert group id sent from azure ad to group names #640

Open small1 opened 1 year ago

small1 commented 1 year ago

New feature.

Ability to convert the group oid to a proper name that is sent from azure ad. on authentication.

This should be a setting pretty much as the enable id4me option.

The code would on authentication from a user query microsoft graph and resolve the oid to a name and then sync that group information down to a readable name.

If the azure ad option is not set it would not be used or visible.

It would ask the microsoft graph api like this and translate the group id to the name.

https://graph.microsoft.com/v1.0/{Configuration.TenantID}/groups/{groupId}

From that it url will get a json that has the name in it and use that instead of oid

small1 commented 1 year ago

@julien-nc We will run a pull request on this where you can check code etc when we have a sample ready.