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
  1. Invoke attachITPolicyToUser().
    AttachITPolicyToUserResult result=coreWebService.attachITPolicyToUser(userId,itpolicyId);
  2. Check the result for errors and handle any errors.
    if (result.getAttachITPolicyToUserReturnStatus().getCode()!= AttachITPolicyToUserReturnStatusEnumType.SUCCESS) 
    {
        // handle any errors
    }
Previous topic: Retrieve an IT policy ID

Was this information helpful? Send us your comments.