C# Class Box.V2.Managers.BoxUsersManager

The manager that represents all of the user endpoints
Inheritance: BoxResourceManager
Exibir arquivo Open project: box/box-windows-sdk-v2 Class Usage Examples

Public Methods

Method Description
AddEmailAliasAsync ( string userId, string email ) : Task

Adds a new email alias to the given user’s account.

BoxUsersManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
ChangeUsersLoginAsync ( string userId, string login, List fields = null ) : Task

Used to convert one of the user’s confirmed email aliases into the user’s primary login.

CreateEnterpriseUserAsync ( BoxUserRequest userRequest, List fields = null ) : Task

Used to provision a new user in an enterprise. This method only works for enterprise admins.

DeleteEmailAliasAsync ( string userId, string emailAliasId ) : Task

Removes an email alias from a user.

DeleteEnterpriseUserAsync ( string userId, bool notify, bool force ) : Task

Deletes a user in an enterprise account.

GetCurrentUserInformationAsync ( List fields = null ) : Task

Retrieves information about the user who is currently logged in i.e. the user for whom this auth token was generated.

GetEmailAliasesAsync ( string userId ) : Task>

Retrieves all email aliases for this user. The collection of email aliases does not include the primary login for the user.

GetEnterpriseUsersAsync ( string filterTerm = null, uint offset, uint limit = 100, List fields = null, string userType = null, bool autoPaginate = false ) : Task>

Get information about users in an enterprise. This method only works for enterprise admins.

GetMembershipsForUserAsync ( string userId, uint offset, uint limit = 100, bool autoPaginate = false ) : Task>

Retrieves all of the group memberships for a given user. Note this is only available to group admins. To retrieve group memberships for the user making the API request, use the users/me/memberships endpoint.

GetUserInformationAsync ( string userId ) : Task

Retrieves information about a user in the enterprise. Requires enterprise administration authorization.

GetUserInviteAsync ( string inviteId, List fields = null ) : Task

Returns information about an existing user invitation.

InviteUserToEnterpriseAsync ( BoxUserInviteRequest userInviteRequest, List fields = null ) : Task

Invites an existing user to join an Enterprise. The existing user cannot be part of another Enterprise and must already have a Box account. Once invited, the user will receive an email and prompt to accept the invitation within the Box web application. This method requires the "Manage An Enterprise" scope for the enterprise, which can be enabled within your developer console.

MoveUserFolderAsync ( string userId, string ownedByUserId, string folderId = "0", bool notify = false ) : Task

Moves all of the owned content from within one user’s folder into a new folder in another user’s account. You can move folders across users as long as the you have administrative permissions and the ‘source’ user owns the folders. To move everything from the root folder, use “0” which always represents the root folder of a Box account.

UpdateUserInformationAsync ( BoxUserRequest userRequest, List fields = null ) : Task

Used to edit the settings and information about a user. This method only works for enterprise admins. To roll a user out of the enterprise (and convert them to a standalone free user), update the special enterprise attribute to be null.

Method Details

AddEmailAliasAsync() public method

Adds a new email alias to the given user’s account.
public AddEmailAliasAsync ( string userId, string email ) : Task
userId string The user ID (required).
email string The email address to add to the account as an alias (required).
return Task

BoxUsersManager() public method

public BoxUsersManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
config IBoxConfig
service IBoxService
converter IBoxConverter
auth IAuthRepository
asUser string
suppressNotifications bool
return Box.V2.Auth

ChangeUsersLoginAsync() public method

Used to convert one of the user’s confirmed email aliases into the user’s primary login.
public ChangeUsersLoginAsync ( string userId, string login, List fields = null ) : Task
userId string Id of the user.
login string The email alias to become the primary email.
fields List Attribute(s) to include in the response.
return Task

CreateEnterpriseUserAsync() public method

Used to provision a new user in an enterprise. This method only works for enterprise admins.
public CreateEnterpriseUserAsync ( BoxUserRequest userRequest, List fields = null ) : Task
userRequest BoxUserRequest BoxUserRequest object.
fields List Attribute(s) to include in the response.
return Task

DeleteEmailAliasAsync() public method

Removes an email alias from a user.
public DeleteEmailAliasAsync ( string userId, string emailAliasId ) : Task
userId string The user identifier.
emailAliasId string The email alias identifier.
return Task

DeleteEnterpriseUserAsync() public method

Deletes a user in an enterprise account.
public DeleteEnterpriseUserAsync ( string userId, bool notify, bool force ) : Task
userId string Id of the user.
notify bool Determines if the destination user should receive email notification of the transfer.
force bool Whether or not the user should be deleted even if this user still own files.
return Task

GetCurrentUserInformationAsync() public method

Retrieves information about the user who is currently logged in i.e. the user for whom this auth token was generated.
public GetCurrentUserInformationAsync ( List fields = null ) : Task
fields List Attribute(s) to include in the response.
return Task

GetEmailAliasesAsync() public method

Retrieves all email aliases for this user. The collection of email aliases does not include the primary login for the user.
public GetEmailAliasesAsync ( string userId ) : Task>
userId string The user ID (required).
return Task>

GetEnterpriseUsersAsync() public method

Get information about users in an enterprise. This method only works for enterprise admins.
Thrown when limit outside the range 0<limit<=1000
public GetEnterpriseUsersAsync ( string filterTerm = null, uint offset, uint limit = 100, List fields = null, string userType = null, bool autoPaginate = false ) : Task>
filterTerm string Filter the results to only users starting with this value in either the name or the login.
offset uint The record at which to start. (default: 0)
limit uint The number of records to return. (min: 1; default: 100; max: 1000)
fields List The fields to populate for each returned user.
userType string The type of user to search for. Valid values are all, external or managed. If nothing is provided, the default behavior will be managed only
autoPaginate bool Whether or not to auto-paginate to fetch all users; defaults to false.
return Task>

GetMembershipsForUserAsync() public method

Retrieves all of the group memberships for a given user. Note this is only available to group admins. To retrieve group memberships for the user making the API request, use the users/me/memberships endpoint.
public GetMembershipsForUserAsync ( string userId, uint offset, uint limit = 100, bool autoPaginate = false ) : Task>
userId string Id of the user.
offset uint The item at which to begin the response.
limit uint Default is 100. Max is 1000.
autoPaginate bool Whether or not to auto-paginate to fetch all group memberships; defaults to false.
return Task>

GetUserInformationAsync() public method

Retrieves information about a user in the enterprise. Requires enterprise administration authorization.
public GetUserInformationAsync ( string userId ) : Task
userId string The user identifier.
return Task

GetUserInviteAsync() public method

Returns information about an existing user invitation.
public GetUserInviteAsync ( string inviteId, List fields = null ) : Task
inviteId string The ID associated with the user invitiation.
fields List Attribute(s) to include in the response.
return Task

InviteUserToEnterpriseAsync() public method

Invites an existing user to join an Enterprise. The existing user cannot be part of another Enterprise and must already have a Box account. Once invited, the user will receive an email and prompt to accept the invitation within the Box web application. This method requires the "Manage An Enterprise" scope for the enterprise, which can be enabled within your developer console.
public InviteUserToEnterpriseAsync ( BoxUserInviteRequest userInviteRequest, List fields = null ) : Task
userInviteRequest BoxUserInviteRequest BoxUserInviteRequest object.
fields List Attribute(s) to include in the response.
return Task

MoveUserFolderAsync() public method

Moves all of the owned content from within one user’s folder into a new folder in another user’s account. You can move folders across users as long as the you have administrative permissions and the ‘source’ user owns the folders. To move everything from the root folder, use “0” which always represents the root folder of a Box account.
public MoveUserFolderAsync ( string userId, string ownedByUserId, string folderId = "0", bool notify = false ) : Task
userId string Id of the user.
ownedByUserId string The ID of the user who the folder will be transferred to.
folderId string Currently only moving of the root folder (0) is supported.
notify bool Determines if the destination user should receive email notification of the transfer.
return Task

UpdateUserInformationAsync() public method

Used to edit the settings and information about a user. This method only works for enterprise admins. To roll a user out of the enterprise (and convert them to a standalone free user), update the special enterprise attribute to be null.
public UpdateUserInformationAsync ( BoxUserRequest userRequest, List fields = null ) : Task
userRequest BoxUserRequest BoxUserRequest object.
fields List Attribute(s) to include in the response.
return Task