6
votes

Trying to execute the following command :

tfx build tasks upload --task-path ./SwapDeploymentSlots

Will result in :

Error: Failed Request: Forbidden(403) - Access denied. [User name] needs Manage permissions to perform the action. For more information, contact the Team Foundation Server administrator.

The user is a member of the Agent Pool Administrators group, as required by the TFS-CLI documentation.

Any ideas on how to solve this?

2

2 Answers

7
votes

Try adding the user to Agent Pool Administrators group via following steps:

  1. Open your VSO account (https://xxxxxx.visualstudio.com/) from Web Portal.
  2. Click "Settings" button to open "Control Panel".
  3. Click "Manage collection security and group membership" link.
  4. Search "[Agent Pools]\Agent Pool Administrators" and select it under "Security" tab.
  5. Click "Add" button under "Members" tab to add the user into the group. enter image description here
3
votes

On TFS 2017 Update1 (installed on-premise) the steps are slightly different.

  1. Open server Web Portal.
  2. Click "Settings" by pressing the gear button on top blue menu.
  3. Click on "Agent Pools" menu item.
  4. Choose the agent pool name you want to handle from the treeview on the left.
  5. Press "Add" button to add the user (or select the existing one if already added).
  6. Click on "Role" cell of the Grid then choose "Administrator" option from the drop-down menu.
  7. Redo steps 4,5,6 foreach agent pool you desired.

enter image description here