IUserDetailsService AddUser Method (UserDetails) CelloSaaS API Documentation
This method is used to create user details. After successful creation of user,
mail(Conformation/Password) will be send to user based on the configuration.

Namespace: CelloSaaS.ServiceContracts.UserManagement
Assembly: CelloSaaS.ServiceContracts (in CelloSaaS.ServiceContracts.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax

string AddUser(
	UserDetails userDetails
)

Return Value

Type: String
User Identifier
Exceptions

ExceptionCondition
System UnauthorizedAccessExceptionIf the user has not the privilege
CelloSaaS.ServiceContracts.UserManagement UserDetailExceptionIf Any exception occurred, while connecting or modifying the database.
CelloSaaS.ServiceContracts.UserManagement SendMailExceptionIf any exception occurred while sending emails
Examples

Public string AddUserDetails()
{
    // Create instance for UserDetails
    UserDetails userDetails = new UserDetails();

    //Fill membership details
    userDetails.MembershipDetails.EmailId = "[email protected]";
    userDetails.MembershipDetails.UserName = "[email protected]";
    userDetails.MembershipDetails.TenantCode = "B590CD25-3093-DF11-8DEB-001EC9DAB123";

    //Fill Address Details
    userDetails.Address.Address1 = "Address";
    userDetails.Address.City = "City";
    userDetails.Address.State = "State";
    userDetails.Address.CountryId = "3FD432E1-A8A4-4F22-BE65-DF751A1FBFE3"; // US
    userDetails.Address.PostalCode = "600025";

    //Fill User Details
    userDetails.User.FirstName = "Company Admin";
    userDetails.User.LastName = "Test";

    IUserDetailsService userDetailsService = (IUserDetailsService)ServiceLocator.GetServiceImplementation(typeof(IUserDetailsService));
    string userId = userDetailsService.AddUser(userDetails);
}
See Also