Bulk change space permissions existing spaces

Dylan Moore March 18, 2024

BLUF (Bottom Line Up Front)

We have recently begun using dynamic groups synced from an external directory in confluence and jira, these groups are now being used for space permissions across confluence. As such I now need a way to bulk edit the space permissions for all of our existing spaces, both personal and communal. The most common change will be identifying spaces giving permission to the default "confluenceusers" group and instead give a new dynamic group (with a longer/more complex name) the same permissions. We have 100's of spaces so wanting to avoid doing 1 by 1.

(before anyone suggests not to do groups this way - its already happened and is a security request so just looking for solutions with our current set up :) )



  • New hires are no longer being added to our default group "confluenceusers" and are instead added to "dynamicgroup_xyz" (altered dynamic group name for security reasons)
    • This means they are not getting access to a lot of spaces by default - we are only finding out about these spaces when a new hire says they cant access a page.
  • There is no way to bulk edit all existing spaces
    • Criteria / behaviour would be simple:
      • IF space permissions contain group "confluenceusers"
      • THEN replace with group "dynamicgroup_xyz" - matching permissions previously given to 
      • Run this against all spaces in our confluence environment, when IF statement fails do nothing.
  • Will then look to replicate this automation for other groups in our environment.


Open to any suggestions of how to tackle this including via the API - while i don't possess the skills to do this change via the API i have a host of people that can lend a hand. 


1 answer

0 votes
Marc Koppelaar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2024

Hi @Dylan Moore 

Space permissions can be set and removed via the API.

Not in bulk, you could write a script that contains all space keys and the use a variable to fill the API call for each space.

See API documentation: https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space-permissions/#api-wiki-rest-api-space-spacekey-permission-post 


Dylan Moore March 19, 2024

Thanks @Marc Koppelaar ! 

I'll discuss this solution with the team internally and will accept your answer once we've got it to work.

Like Marc Koppelaar likes this

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events