Get external users via API
RéponduI'm trying to retrieve external users of an enterprise using an authorized app (via the API) and I consistently get back 0 users (although there are a few). For example using curl:
curl https://api.box.com/2.0/users?user_type=external -H "Authorization: Bearer "
My app is authorized for all the possible access types:
- Read all files and folders stored in Box
- Read and write all files and folders stored in Box
- Manage groups
- Manage webhooks v2
- Manage enterprise properties
- Manage retention policies
- Admin can make calls on behalf of Users
- Enable integrations
- Manage users
- Manage app users
- Generate Tokens
What am I missing?
-
The user_type=external parameter does not allow listing all external users; it must be combined with the filter_term parameter to look up an external user by their login email address. Here's the relevant snippet from the API documentation:
"If
filter_term
is omitted, all managed users (and app users) will be returned. External users can only be returned with an exact match offilter_term
." -
one way to get the external users is first get all enterprise users then get the folders collaboration, the will give you the groups and all users that have access to the folder, if an user with access to the folder is not on the enterprise users list then the user is external
Vous devez vous connecter pour laisser un commentaire.
Commentaires
4 commentaires