Assign User to Roles
Assign User to Roles

This method assigns a user to the specified roles

Name Value
REST-API METHOD ASSIGN USER TO ROLES
HTTP METHOD POST
RESPONSE TYPE XML
URL https://api.csm.next4biz.net/services/UserService/{CompanyID}/userroleassignment.json/{userName}/{LangID}https://api.csm.next4biz.net/services/UserService/{CompanyID}/userroleassignment.xml/{userName}/{LangID}
REQUEST HEAD Authorization: Basic {base64 encoded username:password} Accept: text/html,application/xhtml+json,application/json;q=0.9,*/*;q=0.8 Content-Type: application/jsonAuthorization: Basic {base64 encoded username:password} Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Content-Type: application/xml
  • XML
  • JSON
ENDPOINT DEFINITION
POST
REQUEST BODY
                                    
                                        <?xml version="1.0"?>
<ArrayOfRoleOfUser
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<RoleOfUser>
		<BusinessChannel>
			<BusinessChannelID>{BusinessChannelID}</BusinessChannelID>
			<LangID>{LangID}</LangID>
			<UseIssuePool>{UseIssuePool}</UseIssuePool>
		</BusinessChannel>
		<Entity>
			<CreatorID>{CreatorID}</CreatorID>
			<DefaultChannelID>{DefaultChannelID}</DefaultChannelID>
			<DefaultLanguageID>{DefaultLanguageID}</DefaultLanguageID>
			<IsADUser>{IsADUser}</IsADUser>
			<IsBuiltIn>{IsBuiltIn}</IsBuiltIn>
			<IsCustomer>{IsCustomer}</IsCustomer>
			<IsFirstLogin>{IsFirstLogin}</IsFirstLogin>
			<IsIssueAdmin>{IsIssueAdmin}</IsIssueAdmin>
			<IsResUser>{IsResUser}</IsResUser>
			<IsUserExistInAD>{IsUserExistInAD}</IsUserExistInAD>
			<LangID>{LangID}</LangID>
			<LanguageUICultureID>{LanguageUICultureID}</LanguageUICultureID>
			<UserID>{UserID}</UserID>
			<UserName>{UserName}</UserName>
			<UserType>{UserType}</UserType>
		</Entity>
		<RoleTemplate>
			<ApplicationFunctions>{ApplicationFunctions}</ApplicationFunctions>
			<CreatorID>{CreatorID}</CreatorID>
			<IsCustomerRole>{IsCustomerRole}</IsCustomerRole>
			<LangID>{LangID}</LangID>
			<RoleTemplateID>{RoleTemplateID}</RoleTemplateID>
			<RoleTemplateType>{RoleTemplateType}</RoleTemplateType>
			<SpecialRole>{SpecialRole}</SpecialRole>
		</RoleTemplate>
	</RoleOfUser>
</ArrayOfRoleOfUser>                                    
                                
                                                                        
                                        {
    "RoleOfUser": {
        "BusinessChannel": {
            "BusinessChannelID": "{BusinessChannelID}",
            "LangID": "{LangID}",
            "UseIssuePool": "{UseIssuePool}"
        },
        "Entity": {
            "CreatorID": "{CreatorID}",
            "DefaultChannelID": "{DefaultChannelID}",
            "DefaultLanguageID": "{DefaultLanguageID}",
            "IsADUser": "{IsADUser}",
            "IsBuiltIn": "{IsBuiltIn}",
            "IsCustomer": "{IsCustomer}",
            "IsFirstLogin": "{IsFirstLogin}",
            "IsIssueAdmin": "{IsIssueAdmin}",
            "IsResUser": "{IsResUser}",
            "IsUserExistInAD": "{IsUserExistInAD}",
            "LangID": "{LangID}",
            "LanguageUICultureID": "{LanguageUICultureID}",
            "UserID": "{UserID}",
            "UserName": "{UserName}",
            "UserType": "{UserType}"
        },
        "RoleTemplate": {
            "ApplicationFunctions": "{ApplicationFunctions}",
            "CreatorID": "{CreatorID}",
            "IsCustomerRole": "{IsCustomerRole}",
            "LangID": "{LangID}",
            "RoleTemplateID": "{RoleTemplateID}",
            "RoleTemplateType": "{RoleTemplateType}",
            "SpecialRole": "{SpecialRole}"
        }
    }
}                                    
                                                                    
RESPONSE BODY
                                    
                                        <Response
	xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<Message>{Message}</Message>
	<Result>true</Result>
</Response>                                    
                                
                                                                        
                                        {
    "Message": "{Message}",
    "Result": "true"
}