Export Confluence Space Permissions to CSV While Excluding Default Groups when using Confluence CLI App
When exporting Confluence space permissions using the CLI (Command Line Interface), administrators may want to retrieve only specific permissions, such as VIEWSPACE, and exclude default groups like confluence-users or confluence-administrators.
This article provides an example command that exports the results to a CSV file while filtering out unwanted groups.
Problem
Administrators need to generate a report of space permissions for individual users but want to exclude permissions granted through default groups.
Example requirement:
Export VIEWSPACE permissions to a CSV file.
Exclude default groups such as:
confluence-usersconfluence-administrators
Environment
Atlassian Confluence
Appfire CLI (Command Line Interface)
Solution
Use the following CLI command to retrieve VIEWSPACE permissions for a space while excluding specific groups:
--action getSpacePermissionList
--space SD
--select "id:(confluence-users|confluence-administrators)"
--options "negative"
--file results.csvThis command:
Retrieves space permissions for the specified space (
SD).Exports the results to results.csv.
Excludes the following groups:
confluence-usersconfluence-administrators
Returns only relevant user and group permissions.
Additional commands
Find users and groups without view permissions
To identify users or groups that do not have VIEWSPACE permissions, run:
--action getSpacePermissionList --space SD --select 'view:No'This command helps identify accounts that are missing view access to the specified space.