Team Services | TFS 2017 | TFS 2015 | TFS 2013
As with most team project objects, you can control who has access by setting permissions. With queries, you can configure users and groups to create, delete, view, and manage permissions of shared queries and shared query folders.
All users can create and edit their own queries and save them under My Queries.
By creating folders under Shared Queries, you can grant permissions to users for each folder. For example, if you have several teams contributing to a team project, then you might want to create a folder under Shared Queries for each team to manage their own set of shared queries.
You set permissions from the web portal. By default, only members of the Project Collection Administrators group or Project Administrators group can create or edit a shared query and manage permissions.
The images you see from your web portal may differ from the images you see in this topic. These differences result from updates made to Team Services or your on-premises TFS, options that you or your admin have enabled, and which process was chosen when creating your team project—Agile, Scrum, or CMMI. However, the basic functionality available to you remains the same unless explicitly mentioned.
For an overview of changes in the navigation experience and working within the user and administration contexts, see Work in the web portal.
Set permissions on a new query folder
If you're not a member of the project administrators group, get added, or have your Edit project-level information permission set to Allow.
Create a folder.
Open permissions for the folder you just created.
Change the permissions so that the team member or group can contribute and manage permissions for the folder.
Here we add the Web team and grant them permissions to create and manage permissions to all queries and folders under the Triage folder.
Use the Add menu to add a user identity or group.
Contribute allows team members to create and edit queries and folders under the folder where the permissions were granted. And, Manage Permissions allows team members to manage the permission settings on queries and subfolders.
(Optional) Turn inheritance off. Default is On. By turning inheritance off for a folder, you disallow inheritance of permissions that exist up the chain of query folders. To learn more, see Permissions, Inheritance.
Set permissions on shared query
To keep anyone else from modifying a shared query that you create, you may want to set permissions on a specific query. You can do this by opening the permissions dialog for the specific query.
Open permissions for the query.
Change the permissions so that the team member or group can't edit, delete, or change permissions for the query.
Here we deny permissions for project admins.
With queries, you can not only list work items, you can create status and trend charts and add them to dashboards. You can learn more about permissions and working with queries from these resources:
Q & A
Q: Can I change the owner of a query or folder?
A: No. This feature was removed for TFS 2015. You can only enable permissions for users and groups from the permissions window for the query or folder.
Q: Can I add folders to team favorites?
A: No. You can only add folders under My Queries and under Shared Queries.
Q: Are the queries and folders I create from the web portal the same as in Team Explorer?
A: Yes. You might have to refresh your browser or client to see changes you make in another client.
Q: Can I move a query or a folder?
A: Yes. In the web portal, choose Rename from the context menu. In Team Explorer for Visual Studio, simply drag the folder to the new location.
In Team Explorer for Eclipse, choose Move from the context menu and select the folder to which you want to move the item.
Feedback and support
We welcome your feedback.
Or, see our comprehensive feedback and support page.