0

Enable user with the API

Hello,

While it's easy to disable a user with the API (see here), I'm wondering how to re-enable it.

I can't find anything about this in the documentation. The only method I found there to update an object record (and set active__v back to true) is to update records in bulk, which is not convenient for a single object.

Any guidance?

Thanks!

Raph

 

3 comments

  • Avatar
    Aaron E Official comment

    Hello Raphael,

    If the user was disabled at the domain level you would use- https://developer.veevavault.com/api/18.1/#update-single-user 

    $ curl -X PUT -H "Authorization: {SESSION_ID}" \
    -H "Content-Type: application/x-www-form-urlencoded" \
    -d "is_domain_admin__v=true" \
    https://myvault.veevavault.com/api/v15.0/objects/users/25001

    If they are active on the domain and disabled in the vault-  https://developer.veevavault.com/api/18.1/#update-vault-membership

    $ curl -X PUT -H "Authorization: {SESSION_ID}" \
    -H "Content-Type: application/x-www-form-urlencoded" \
    -d "active__v=true" \
    https://myvault.veevavault.com/api/v15.0/objects/users/25001/vault_membership/3003

     

    Regards,
    Aaron

  • Avatar
    Raphael Goubet

    Thanks Aaron!

  • Avatar
    Mary P

    I moved this post from the Vault Q&A Community to our new Vault Developer Community.

Please sign in to leave a comment.