Pramod KB Pramod KB - 2 months ago 15x
C# Question

Attask - Create a new user via API

I am integrating a .Net application with Work-front, I am supposed to create a new user in work-front from API. I have tried the steps mentioned in the link and my code


From my console application I get internal server error 500. From fiddler I get parse error.


Above code gives unrecognized URI format: too many parts - exception

Though my requirement is to authorise using API key, I was trying possible ways of achieving it.But I am not able to create in any of the ways.However, I am able to create from UI, which confirms my ID has rights to create user. I did look into API explorer and could see named functions,but whats the approach?Is there any documentation for these complete steps? My search was in-vain. Please suggest as I am new bee to workfront. Thanks in advance!

Update 1:

I was able to create a user via the API authorising by both API key and sessionID. The parameter I missed to pass is username (not necessarily an existing username). My code is -


My first step is resolved. There are 2 more steps which I need to perform. Calling named action - assignUserToken. I tried the code as below and it didn't work

ID is value returned while creating a user. Error returned is -
{"error":{"class":"java.lang.IllegalArgumentException","message":"null objCode"}}

Can you share the syntax of calling this named action?


Hi Your call has a few things wrong with It 1st you are calling


this needs to be


2nd you are calling


it should be


Other then that I dont see anything else wrong with the call.