Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Management API - DeleteUMA

I am trying to write a script to run that will remove the assigned user from a laptop so that we can then re-image it and give it to a new user. As it stands SGN will sync with the client after re-image and configure it for the old user again.

Obviously this can be done manually in the management centre but I would like to use an automated script if possible.

I have looked at the UmaAPI.vbs on the product CD but cannot get this to run. I'm probably missing something obvious!

Does anyone have any experience with this or has wrote a similar script themselves?

Thanks

:34163


This thread was automatically locked due to age.
Parents
  • Check that the Security Officer name and password is correct. The return code "-6" points to wrong authentication.

    Please find an extract of the basic return codes from the API manual below:

    2.15 Error codes returned by the API methods
    
    Note: As soon as an error is returned by the API, the user can call GetLastError to receive a
    more detailed error message along with the internal error code. Note that the error message string
    will be localized.
    
    OBJECT_OWN_MEMBER = -15 Object cannot be its own member.
    For example: a group cannot be its own member.
    ACTION_NOT_FINALIZED = -14 Action (e.g. wildcard search) not finalized.
    ACTION_NOT_INITIALIZED = -13 Action (e.g. wildcard search) not initialized.
    RESULT_NOT_UNIQUE = -12 Result set is not unique.
    INVALID_CHALLENGE_CODE = -11 Wrong challenge code entered for Challenge/
    Response.
    NO_MORE_DATA = -10 End of data in any wildcard search method.
    INSUFFICIENT_RIGHTS = -9 Current Security Officer has insufficient rights.
    CONFIG_FILE_ERROR = -8 .conf file could not be found or is invalid.
    TOKEN_INVALID_SLOT = -7 Invalid token slot ID.
    NOT_AUTHENTICATED = -6 Security Officer has not authenticated.
    OBJECT_NOT_FOUND = -5 Object not found in the database.
    OBJECT_ALREADY_EXISTS = -4 Object already exists.
    TOKEN_NOT_PRESENT = -3 No token in the slot.
    NOT_INITIALIZED = -2 API was not initialized.
    FAILURE = -1 General failure.
    OK = 0 Success.
    :34461
Reply
  • Check that the Security Officer name and password is correct. The return code "-6" points to wrong authentication.

    Please find an extract of the basic return codes from the API manual below:

    2.15 Error codes returned by the API methods
    
    Note: As soon as an error is returned by the API, the user can call GetLastError to receive a
    more detailed error message along with the internal error code. Note that the error message string
    will be localized.
    
    OBJECT_OWN_MEMBER = -15 Object cannot be its own member.
    For example: a group cannot be its own member.
    ACTION_NOT_FINALIZED = -14 Action (e.g. wildcard search) not finalized.
    ACTION_NOT_INITIALIZED = -13 Action (e.g. wildcard search) not initialized.
    RESULT_NOT_UNIQUE = -12 Result set is not unique.
    INVALID_CHALLENGE_CODE = -11 Wrong challenge code entered for Challenge/
    Response.
    NO_MORE_DATA = -10 End of data in any wildcard search method.
    INSUFFICIENT_RIGHTS = -9 Current Security Officer has insufficient rights.
    CONFIG_FILE_ERROR = -8 .conf file could not be found or is invalid.
    TOKEN_INVALID_SLOT = -7 Invalid token slot ID.
    NOT_AUTHENTICATED = -6 Security Officer has not authenticated.
    OBJECT_NOT_FOUND = -5 Object not found in the database.
    OBJECT_ALREADY_EXISTS = -4 Object already exists.
    TOKEN_NOT_PRESENT = -3 No token in the slot.
    NOT_INITIALIZED = -2 API was not initialized.
    FAILURE = -1 General failure.
    OK = 0 Success.
    :34461
Children
No Data