Rediger

Del via


Set permissions on queries and query folders

Azure DevOps Services | Azure DevOps Server | Azure DevOps Server 2022

Set permissions on queries and query folders to control who can create, edit, delete, and manage them.

  • My Queries — All users except Readers can create and edit their own queries. Only the signed-in user can view them.
  • Shared Queries — By default, only Project Administrators can create, edit, or change permissions. Create a folder for each team so they can manage their own shared queries.

For more information, see Organize queries.

Note

The following images show the New Boards Hub feature enabled by default. For more information, see Manage or enable features.

Prerequisites

Category Requirements
Access levels At least Basic access. Users with Stakeholder access can't create or save queries in a shared folder.
Permissions - To manage permissions, be a member of the Project Administrators group.
- To create or edit a shared query, have Contribute set to Allow for the shared query folder.
- To change permissions on a query or folder, have Manage Permissions set to Allow for that folder.

Default query permissions

A ✔️ (checkmark) in the following table indicates that the corresponding security group has permission to exercise the task by default.

Task

Readers

Contributors

Project admins


View and run managed queries, view query charts

✔️

✔️

✔️

Create and save managed My queries, query charts

✔️

✔️

Create, delete, and save Shared queries, charts, folders

✔️

Set permissions on a new query folder

Tip

To rename or move a shared query or folder, you need Delete and Contribute permissions for the destination folder.

  1. From your project, select Boards > Queries > All > Shared Queries.

    Screenshot showing sequence of selections to get to Shared Queries.

  2. Select New folder.

    Screenshot of New folder selection.

  3. Enter the folder name and select the parent folder from the dropdown list.

    This example creates a Service Delivery folder for that team.

    Screenshot of New folder dialog.

  4. Select More actions > Security.

    Screenshot of security selection for query folder.

  5. Search for the user or group, then grant them Contribute and Manage Permissions for the folder.

    This example grants the Service Delivery team both permissions for all queries and subfolders under their folder.

    Screenshot of Permissions dialog for a query folder.

    • Contribute — Create and edit queries and folders.
    • Manage Permissions — Change permission settings on queries and subfolders.
  6. (Optional) Turn off inheritance to prevent permissions from being inherited from parent folders. For more information, see Permissions, Inheritance.

  7. Close the dialog, then reopen it and select the team to verify the permissions.

    Screenshot of Permissions dialog for a query folder, verify permission settings.

  1. Choose All. Expand Shared Queries.

  2. To add a folder, choose the More actions icon for an existing folder or the top container folder, and choose New folder.

    Screenshot that shows Open More actions menu, choose New folder.

  3. Enter the folder name. To change the location, select Rename from the folder dropdown menu.

    This example creates a Service Delivery folder for that team.

    Screenshot of New folder dialog.

  4. Choose the More actions icon and select Security.

  5. Search for the user or group, then grant them Contribute and Manage Permissions for the folder.

    This example grants the Service Delivery team both permissions for all queries and subfolders under their folder.

    Screenshot of Permissions dialog for a query folder.

    • Contribute — Create and edit queries and folders.
    • Manage Permissions — Change permission settings on queries and subfolders.
  6. (Optional) Turn off inheritance to prevent permissions from being inherited from parent folders. For more information, see Permissions, Inheritance.

  7. Close the dialog, then reopen it and select the team to verify the permissions.

    Screenshot of Permissions dialog for a query folder, verify permission settings.

Set permissions on a shared query

To prevent others from modifying a shared query, set permissions directly on that query.

  1. Select the More actions icon and select Security.

    Screenshot of Open query permissions context menu.

  2. Deny the relevant permissions for the user or group. This example denies permissions for the Disallow access group.

    Screenshot of Permissions dialog for a shared query.

  1. Select the More actions icon and select Security.

    Screenshot of Open query permissions context menu.

  2. Deny the relevant permissions for the user or group. This example denies permissions for the Disallow access group.

    Screenshot of Permissions dialog for a shared query.