---
title: "How to use setShareScope action in Jira Command Line Interface (CLI)"
canonical: "https://support.appfire.com/space/SUPPORT/89133682/How%20to%20use%20setShareScope%20action%20in%20Jira%20Command%20Line%20Interface%20(CLI)"
format: markdown
---
This article explains how to set the scope of a filter in Jira to either Global or Private using Jira Command Line Interface (CLI).

## Instructions

The setShareScope action in Jira CLI, allows the filters to be available either globally or privately with *Global* and *Private* settings respectively.

1. Before creating a filter in Jira, set the scope of the filter using the action [setShareScope](https://appfire.atlassian.net/wiki/x/FxA4B) as given in the example below:
  This action defaults the filter share scope for the current user to Global.
2. Create a filter using the [createFilter](https://appfire.atlassian.net/wiki/x/QCo4B) action as given in the example below:
  This action creates a filter named "filterforTSboard" for the Jira project "TESTER01".
3. Verify the filter permissions from Jira UI with the instructions below:
  1. Log into Jira as an administrator.
  2. From the top navigation bar, click *Issues.*
  3. From the dropdown select the *Manage filters *option, as shown in the screenshot below:
    As the screenshot below indicates, the filter "filterforTSboard" has no restrictions and can be viewed by any logged-in user.
4. Similarly, the filters can be restricted by setting the scope to <span style="color: #091e42">Private</span>. Refer to the sample action given below for the same:
5. The filter "filterforTSboard-1" is set as Private in Jira as shown in the screenshot below:

> ℹ️ Please note that the scope of the filter can only be applied during filter creation but not while updating. Hence setShareScope doesn't set the filter scope when performing **updateFilter** CLI action.


> ℹ️ <span style="color: #000000">It is recommended to test this scenario in a non-production environment, or run the action with the</span><span style="color: #333333"> </span>[*--simulate*](https://appfire.atlassian.net/wiki/spaces/BCLI/pages/65933690/Parameters#Parameters-simulate)<span style="color: #333333"> </span><span style="color: #000000">parameter to verify the behavior before deploying.</span>