Skip to content

Cannot call getReleaseWorkItemsRefs using the pipeline OAUTH token #394

@rfennell

Description

@rfennell

Environment

Azure DevOps Services
azure-devops-node-api version: 8.1.1

Issue Description

I am try to programmatically get the WIs that are linked to a GitHub commit using the AB#123 format (provided by the Azure DevOps Boards connector for GitHub) inside a pipeline task.

  1. Create a build pipeline based on a GitHub repo that is linked to Azure DevOps Boards
  2. Commit and push stuff with "AB#XX" references in commit messages to GitHub
  3. Create an Azure DevOps Release based on build artifact with my task included
  4. If, in a custom pipeline task, I use the following Node API call

let workitems = await releaseApi.getReleaseWorkItemsRefs(teamProject, currentReleaseID, pastReleaseID);

  • If my Node API is setup to use a user generated PAT the call works and it returns the expected WIs.
  • If my Node API I setup to use the Pipeline’s Access Token I get an error

##[error]Error: You do not have permissions to perform this operation on the service connection. An Endpoint Administrator should add you to the Endpoint Readers group of this service connection

Expected behaviour

I would expect to be able to add the pipeline account using OAUTH to have access to this endpoint

Actual behaviour

When I settings I look at the Boards > GitHub connections I can see what I assume is the correct endpoint connector, but it provides no option to alter who has rights to use it.

Is there a way to grant access to this connector to the pipeline service account?

If there is, which security page is it on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions