Create or Delete account in Gitlab SaaS using Cli

Dear Team,

I am using Gitlab SaaS and currently working on a requirement to create a user or delete it as per our need. Now I am trying to achieve it using python Gitlab library and api but both the commands give me
“gitlab.exceptions.GitlabDeleteError: 403: 403 Forbidden”

user = gl.users.list(username=‘abc’)[0]

I wanted to know if we can create or delete SaaS account through CLI

Thank you !

Hi @anupama.sharma

probably you have a PAT (personal access token) that you use to create the gl object in that line of code. The first thing to check is whether the user who owns the PAT has permissions to delete the particular user. The API documentation suggests that you need administrator access, in which case you won’t be able to do this with GitLab SASS, AIUI.

I though so as well. Thank you @snim2

1 Like