Symantec Access Management

Java DMSAPI - how to remove attribute

  • 1.  Java DMSAPI - how to remove attribute

    Posted Apr 15, 2019 09:48 AM

    I want to remove an attribute from a user (SmDMSUser).

     

    Code snippet using the Java DMSAPI -  

     

    Hashtable<String,Object> attributes = user.getAttributes();

    //remove attribute from attributes collection

    attributes.remove(attribute);

    //set the updated attributes
    user.setAttributes(attributes);
    result = user.modifyObject();

     

    //result -
    removeUserAttribute failed..nArg=1,Arg1=32error:851reason:1002

     

    Also tried calling setAttribute() for each individual attribute but got the same result. 

     

    Any recommendations for how to remove an attribute ? sample code would be helpful.  

     

    Thanks,

    Mark