Post

4 followers Follow
0
Avatar

User Provisioning.

The field "State" on entity "User" is read only. How am I supposed to disable the users?

Please advise.

Import from old forum Answered

Please sign in to leave a comment.

4 comments

0
Avatar

Go to Settings >> User Management >> Users, then select the user and on the main menu select More Actions >> Delete User.  At this point you can either disable or delete the user.

Clarizen Team 0 votes
Comment actions Permalink
0
Avatar

I wasn't specific - I want to do this with the API. 
 Sorry - I thought that should be clear since this is the developer forum. 

 I am using the API to create users; I would also like to disable using the API.

Import from old forum 0 votes
Comment actions Permalink
0
Avatar

State changes can be done with the LifecycleMessage

Use the Disable operation.

Here is sample XML.

Good luck!

Ophir

<?xml version="1.0" encoding="utf-16"?>

<BaseMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:q1="http://clarizen.com/api" xsi:type="q1:LifecycleMessage">

  q1:Ids

    q1:EntityId

      q1:TypeNameuser/q1:TypeName

      q1:Value00000000-00000-0000-0000-00a441d72bb5/q1:Value

    /q1:EntityId

  /q1:Ids

  q1:OperationDisable/q1:Operation

  q1:Recursivefalse/q1:Recursive

</BaseMessage>

Clarizen Team 0 votes
Comment actions Permalink
0
Avatar

curl -X POST -H "Authorization: Session xxx" -d "{'State':'Disabled'}" https://api.clarizentb.com/v2.0/services/data/objects/User/xxx
{"errorCode":"InvalidOperation","message":"Invalid operation: Field 'State' cannot be updated. The field is marked 'read-only'.","referenceId":"xxx"}

What would be the REST way of updating state?  I can update other fields.  Just not this one.  And I cannot change its setting in the admin UI.

Kurt Kremer 0 votes
Comment actions Permalink