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().
AttachITPolicyToUserResult result=coreWebService.attachITPolicyToUser(userId,itpolicyId);
-
Check the result for errors and handle any errors.
if (result.getAttachITPolicyToUserReturnStatus().getCode()!= AttachITPolicyToUserReturnStatusEnumType.SUCCESS)
{
// handle any errors
}
Was this information helpful? Send us your comments.