Returns a list of all users for the Enterprise along with their user_id
,
public_name
, and login
.
The application and the authenticated user need to have the permission to look up users in the entire enterprise.
id,type,name
A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.
Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.
john
Limits the results to only users who's name
or
login
start with the search term.
For externally managed users, the search term needs to completely match the in order to find the user, and it will only return one user at a time.
1000
1000
The maximum number of items to return per page.
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii
Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination.
This requires usemarker
to be set to true
.
1000
0
The offset of the item at which to begin the response.
true
Specifies whether to use marker-based pagination instead of offset-based pagination. Only one pagination method can be used at a time.
By setting this value to true, the API will return a marker
field
that can be passed as a parameter to this endpoint to get the next
page of the response.
managed
Limits the results to the kind of user specified.
all
returns every kind of user for whom the
login
or name
partially matches the
filter_term
. It will only return an external user
if the login matches the filter_term
completely,
and in that case it will only return that user.managed
returns all managed and app users for whom
the login
or name
partially matches the
filter_term
.external
returns all external users for whom the
login
matches the filter_term
exactly.Value is one of all
,managed
,external
Returns all of the users in the enterprise.
An unexpected client error.
curl -X GET https://api.box.com/2.0/users \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxCollection<BoxUser> users = await client.UsersManager.GetEnterpriseUsersAsync();
Iterable<BoxUser.Info> users = BoxUser.getAllEnterpriseUsers(api, true, null);
// Get marker
String marker = ((BoxResourceIterable<BoxUser.Info>) users).getNextMarker();
users = client.users(user_type='all')
for user in users:
print('{0} (User ID: {1})'.format(user.name, user.id))
client.enterprise.getUsers({usemarker: true, marker: 'JFUirotE56hfyr56FH123'})
.then(users => {
/* users -> {
total_count: 1,
entries:
[ { type: 'user',
id: '33333',
name: 'Example User',
login: 'user@example.com',
created_at: '2012-05-03T21:39:11-07:00',
modified_at: '2012-08-23T14:57:48-07:00',
language: 'en',
space_amount: 5368709120,
space_used: 52947,
max_upload_size: 104857600,
status: 'active',
job_title: '',
phone: '5555551374',
address: '10 Cloud Way Los Altos CA',
avatar_url: 'https://app.box.com/api/avatar/large/deprecated' } ] }
*/
});
client.users.listForEnterprise() {
switch results {
case let .success(iterator):
for i in 1 ... 10 {
iterator.next { result in
switch result {
case let .success(user):
print("\(user.name) (ID: \(user.id))")
case let .failure(error):
print(error)
}
}
}
case let .failure(error):
print(error)
}
}