Unable to delete groups through APIs
Unable to delete groups through APIs with Primary Org Admin's user token.
Hello,
We are trying to delete a group in the organization with tsadmin(primary org admin) token.
But it throws an error of invalid parameter and the group doesn't exist.
On the search group, it's returning its details.
Group ID: c7c1c795-e9dd-4232-8c
We are using the following request for making API call,
curl -X POST \
--url 'https://my-company.thoughtspot.cloud/api/rest/2.0/groups/c7c1c795-e9dd-4232-8cdf-70133369c305/delete' \
-H 'Authorization: Bearer <ts admin token>'
Thanks,
8 Replies
Hello @ashish,
Do you have any updates on this?
FYI: We are using the correct Group Id which we are fetching using the "https://my-company.thoughtspot.cloud/api/rest/2.0/groups/search".
After getting the above error, if we pass the same ID to search, we get that group.
Any help will be appreciated.
Thanks,
From which org you are logged in, try to login in the same org to which usergroup is part of and delete it.
I am using the ts-admin token.
Are you sending the same parameters while deleting and searching? If yes we might need ot check the backend as to why this is returning groupId not found..
@Vikaschandra :
1. Using Search or via UI.. find out which org does the group belongs to. Say Org is ABC
2. Then get the token for the org ABC using fetch token API v2.0
3. And then try deleting the group using token in Authorization header (just like what you did earlier
Also pls do provide below info:
1. TS Cluster version which you are on
2. Result of group search
cc: @shikharTS
@RT @shikharTS @ashish Thanks, guys, Now I can delete the Group by using the token from its belonging Org. However, is there any way ? Can I delete a group of any Org using the primary Org token?
I am not sure if we can use the primary Org token. Let me confirm with the team internally and provide you with a solution/work around if possible
@Vikaschandra will update by today/tomorrow EOD.
@Vikaschandra no you cannot delete group of other org by using primary org token. we don't support this.