The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Add Users to workspace through API REST

mgnavarrete
Contributor
January 23, 2023

Hi! 

I have an identity provider to obtain users in my organization at atlassian adminstrator. Now, I want to add those users automatically to my workspace in Bitbucket Cloud. Is there a way to add them or send them an invitation using an API?

In case this is not possible using a API, is there a way to invite users to a workspace automatically instead of doing manually user by user in the Bitbucket Cloud UI?

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 24, 2023

G'day @mgnavarrete, and welcome to the community!

We do have an available API to send user invitations into Bitbucket cloud Workspace:

invitations Endpoint 

Example curl:

curl --request PUT \
  --url https://api.bitbucket.org/1.0/users/<workspace>/invitations \
  --header 'Authorization: <auth> \
  --header 'Content-Type: application/json' \
  --data '{"email":"<email_to_be_invited>","group_slug":"<group_to_be_invited_to"}'

Currently, in the Bitbucket cloud, the user has to be manually invited into Bitbucket and accept the invitation before accessing the Workspace.

That said, our roadmap mention User provisioning with Atlassian access around Q2 2023, so do keep an eye on it.

Cheers,
Syahrul

mgnavarrete
Contributor
January 25, 2023

It works perfectly, thanks!! 

I will keep and eye on the roadmap :)

Like Syahrul likes this
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events