Add "GET /groups/:id/enterprise_users" API endpoint
Add "GET /groups/:id/enterprise_users" API endpoint to allow group owners
- get a list of all enterprise users of the group
- see enterprise users' emails
- search enterprise user by their primary and secondary emails
and provide support for the rest of features GET /groups/:id/provisioned_users
API endpoint supports.
Prior to &9675 (closed) GET /groups/:id/provisioned_users
endpoint allowed group owners get list of enterprise users since provisioned by group users were considered enterprise users. We changed the enterprise user definition, being provisioned-by-group-user is not sufficient to be an enterprise user.
Changing GET /groups/:id/provisioned_users
API endpoint to return enterprise users would not be right direction since the API path implies that it supposed to return provisioned_users
. In #429285 (comment 1728948383) we should decide what to do with that endpoint.
allow group Owners to obtain users' email addresses for Enterprise Users using updated definition by using Members API, why do we need "GET /groups/:id/enterprise_users" API endpoint?
Since we"GET /groups/:id/enterprise_users" API endpoint will allow group owners
- get the list of all enterprise users of their group. If an enterprise user is not a member of the resource, Members API will not return the record for that user
-
verify whether there is enterprise user for specific email by using
search
parameter. There isGET /groups/:id/billable_members
API endpoint, but it returns records of those users that are members and it allows searching by public user email only.
Having separate endpoint that is dedicated to enterprise users only could also prevent unintentional disclosing users' private information.