Answered

Using REST API to change User's Role causes System Error

  • 11 November 2020
  • 1 reply
  • 430 views

Heya,

I am trying to use the REST API to automatically deprovision our users when a member leaves the team.

I am using the Update Team User Connection endpoint to change a member’s role from ‘member’ to ‘non_team’. I’m doing this because it’s the best way to ensure a member’s boards aren’t deleted when their account is removed.

When I try this with an account, I get a 500 error, both via Postman and the API reference page, with the message InternalError.

After this happens, the user can no longer access the Team Boards at all. The web interface’s Users list still lists them as a Full member, and presumably they are still licensed as such.

When using the API, the user is no longer listed under List All Team Members, and the Team User Connection ID will 404.

Is this a bug that I'm running into, or am I doing something wrong here? 

Is there a better practice to deprovision users?

Thanks for any help you can provide!

icon

Best answer by Daniela Gavidia 12 November 2020, 14:01

View original

This topic has been closed for comments

1 reply

Userlevel 4
Badge

Hello Danny,

 

Thank you for pointing out this issue with the Update Team User Connection endpoint. I have been able to reproduce the issue and filed a bug report with the engineering team.

Regarding deprovisioning users, I think you had the right approach. Another option would be to DELETE the Team User Connection. However, that would delete any boards and projects owned by the user, so you would have to be careful and transfer ownership of those resources first, if you’d like to keep them.

 

Kind regards.

 

Daniela

Developer Experience Team