CA Service Management

Expand all | Collapse all

Remove GroupMembership usin Safex

Jump to Best Answer
  • 1.  Remove GroupMembership usin Safex

    Posted 05-22-2017 09:59 AM

    Hi, can I only remove one group from user using Safex command, actually if I use this command the program remove all application groups from de users

     

    <Safex>
    <Attach label="Service Catalog"/>
    <Remove>
    <User folder="/" name="wbermudez">
    <GroupMembership>Gm-Cliente</GroupMembership>
    </User>
    <User folder="/" name="wbermudez1">
    <GroupMembership>Gm-Cliente</GroupMembership>
    </User>
    </Remove>
    </Safex>


  • 2.  Re: Remove GroupMembership usin Safex
    Best Answer

    Posted 05-23-2017 02:15 AM

    Good Morning Walter Xavier.
     
    First to say is that 'safex' doesn't have the option to remove a user from a particular global group.
    You would need to delete the user and redefine it again without that specific global group.

     

    This is a sample of the XML file for the safex command:
    <?xml version='1.0' encoding='UTF-8' standalone='no'?>
    <Safex>
    <Attach label="Service Catalog"/>
    <Remove>
    <User folder="/" name="user1">
    </User>
    <User folder="/" name="user2">
    </User>
    <User folder="/" name="user3">
    </User>
    </Remove>
    <Add>
    <User folder="/" name="user1">
    <GroupMembership>tech</GroupMembership>
    </User>
    <User folder="/" name="user2">
    <GroupMembership>support</GroupMembership>
    <GroupMembership>tech</GroupMembership>
    </User>
    <User folder="/" name="user3">
    <GroupMembership>support</GroupMembership>
    <GroupMembership>tech</GroupMembership>
    </User>
    </Add>
    </Safex>
     
    The 'Remove' tag will remove just the Application Details of the user.
    And then the 'Add' tag will add the new application details.
     
    Then run the following command on those files, as necessary:
    safex -u Eiamadmin -p {Password} -f {FileName.xml}
     
    Kind regards, Louis van Amelsfort.