I need to change the permissions other users workspaces.
The workspace is actually private and i need to change it to public to perform some operations and after back to private.
with command line i can perform this:
tf workspace /collection:COLLECTION WORKSPACE;USER /permission:Private|Public
there is a way to make this using the api?
Thanks for your post.
For how to change the Workspace’s permission using TFS API, please refer to this blog:
// Use the current directory to infer the workspace and TFS team project collection.
wi = Workstation.Current.GetLocalWorkspaceInfo(Environment.CurrentDirectory);
tpc = new
vcs = tpc.GetService<VersionControlServer>();
workspace = vcs.GetWorkspace(wi);
// Get the identity service for the TPC.
ims = tpc.GetService<IIdentityManagementService>();
// Get the security service for the TPC and use it to get the workspace security namespace.
security = tpc.GetService<ISecurityService>();
// Get the access control list for the workspace, using the workspace's security token in the namespace.
acl = workspaceSecurityNamespace.QueryAccessControlList(workspace.SecurityToken,
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?