How remove anonymous access from all Confluence spaces
Asked by sanan sanan:

Hi,

We have hundreds of spaces in Confluence which have read-only access enabled for anonymous.

We want to remove anonymous access from all such Conflunece space. Its a long task to open all such spaces one by one and remove the anonymous access.

Is there any easy way in Confluence where I can remove all the anonymous permission from all the spaces in one go. Any CLI option or database command.

Any help will be appreciated.

Thanks


Answers:
author: Prakhar Srivastav {Appfire}
body: [@sanan sanan](/t5/user/viewprofilepage/user-id/1152151)

You can stop anonymous access from global configuration. It will stop anonymous access to all your Confluence Spaces.

Go to global permission and deselect anonymous access.

Regards

Prakhar

comments: author: sanan sanan
body: Hi Prakhar,

I have already removedthe the entry for anonymous from the global permissions. new spaces will not get any anonymous access by default now.

but my quest is about how to remove the anonymous access from the existing spaces in any easy way. I want to avoid opening permissions on each and every space and remove the anonymous access. There are hundreds of such spaces..

Regards


author: Prakhar Srivastav {Appfire}
body: Hi [@sanan sanan](/t5/user/viewprofilepage/user-id/1152151)

Global Permission will take preference over space level permission. What I mean is if you have removed anonymous access from Global Permission then space level anonymous access are of no use and preference will be given to global level. So anonymous user will not be able to access spaces.

Still if you want to try CLI and run command to change the permission at individual space level then you can try bobswift confluence cli. Below is the link for the command reference :

<https://bobswift.atlassian.net/wiki/spaces/CSOAP/pages/10584068/Reference#Reference-removePermissions>

Regards

Prakhar


author: sanan sanan
body: OK..I got it now.

After removing the anonymous access from the global permissions, I did not check the spaces. I can see now that no space has anonymous access enabled.

This worked.

Thanks for your help, Prakhar.

Have a nice day.

Regards


author: Prakhar Srivastav {Appfire}
body: Hi [@sanan sanan](/t5/user/viewprofilepage/user-id/1152151)

<br />

You are welcome! If you feel like my answer helped you, kindly mark my answer as accepted.

Regards

Prakhar


author: sanan sanan
body: Hi Prakhar,

unfortunately the solution you suggested worked only as I expected earlier. It only takes affect for the new spaces created.

it does not supersede the anonymous permission given on the older spaces. surprisingly it does mention as below on the permission page of the older spaces

**Anonymous users can't view this space** because global anonymous 'Use Confluence' permission is currently turned off.   
Go to [global permissions](https://confluence.bbsas.no/admin/permissions/globalpermissions.action) to grant anonymous users permission to use Confluence.

but it does not do as it says. an anonymous user can still see the space. and to me it seems quite a bug in Confluence.

So I really need to remove all the view permissions for the existing spaces for anonymous

do you know any way to do this.?

Regards


author: Prakhar Srivastav {Appfire}
body: Hi [@sanan sanan](/t5/user/viewprofilepage/user-id/1152151)

This is very strange and may be you are missing something here. I will suggest you to check with Atlassian as well.

On the other hand if you want CLI to run for all the spaces then you can explore Bobswift CLI for Confluence. Here is the reference to the action :

<https://bobswift.atlassian.net/wiki/spaces/CSOAP/pages/10584068/Reference#Reference-removePermissions>

Regards

Prakhar


Tags: anonymous

confluence-server

server