Assign an IT policy to a user account
To assign an IT policy to a user account, you can use the
attachITPolicyToUser() method.
Before you begin: Retrieve the following integers:
- itPolicyID integer for the ID of the IT policy that you want to assign to the user account
- userID integer for the ID of the user account that you want to assign the IT policy to
-
Invoke attachITPolicyToUser().
AttachITPolicyToUser request = new attachITPolicyToUser();
request.userId = userID;
request.itPolicyId = itPolicyID;
AttachITPolicyToUserResponse response = coreWebService.attachITPolicyToUser(request);
AttachITPolicyToUserResult result = response.returnValue;
-
Check the result for errors and handle any errors.
if (result.attachITPolicyToUserReturnStatus.code != AttachITPolicyToUserReturnStatusEnumType.SUCCESS)
{
// handle any errors
}
Was this information helpful? Send us your comments.