Web API - Edit Project
Received a message of "You do not have permission to modify this project" when trying to update a project via the Web API.call to /TDWebApi/api/projects/{ID}
Verified that the API user has access to TDAnalysis and TDProjects.
Also verified that Security Role permissions of:
Project
Modify Project Initial Values
Project Portfolio
Edit All Portfolios and Programs
Manage all projects in my Portfolios and Programs
are set. Any idea as to what is preventing me from updating the project(s)?
Answer (1)
Hello Quan,
Which user are you trying to authenticate into the API with?
Also, can you provide the body of the call you're trying to make to this endpoint so we can see what the update is?
If you would feel more comfortable in the context of a support ticket rather than an open forum like this Questions page feel free to resubmit this as a ticket and we can follow up further. Or redact anything that might be sensitive, but we will need to know which fields you were trying to change the values of and we will need the full body of the call you were attempting.
Sincerely,
Mark Sayers
Sr Support Consultant, CS
I over-write the project description and then convert the project object back into JSON and pass it into another CURL as postfields along with the authentication headers.
I've also tried just passing back only the 5 required project fields along with an updated description as JSON instead of a full object.
Both give me the same "You do not have permission to modify this project". - Quan Chung Thu 1/6/22 3:06 PM
If so, that account would not be the appropriate one to use as the endpoint does not specifically call for it to be used. Instead you'd want to create a Service Account in your TDAdmin > Users & Roles > Users area and give it the necessary permissions.
Additionally, that project POST endpoint is expecting a full project API object to be passed to it. Passing only the required fields and the Description could result in data loss on your project. You might try performing a GET first to get the full project, then pass that entire response body back along with the updates you are attempting to make. - Mark Sayers Thu 1/6/22 3:26 PM
At: https://tdx-test.its.msstate.edu/TDAdmin/Users/Users.aspx?
Name: Web Dev Api Service Account
Type: Service Account
Username: xxxxxx
Security Role: WebDev API Service
License Type: Enterprise - Quan Chung Thu 1/6/22 3:33 PM
and the user (in addition to Analysis and Projects/Workspaces app access) does have TDNext access too? - Mark Sayers Thu 1/6/22 4:16 PM