joshjohanning/ado_workitems_to_github_issues

"ERROR: The requested resource requires user authentication" on every work item.

askpatrickw opened this issue · 1 comments

On every item I get this error message:

Copying work item 311 to {gh-org}/{gh-repo} on github
  Issue created: https://github.com/{gh-org}/{gh-repo}/issues/304
  comment created: https://github.com/{gh-org}/{gh-repo}/issues/304#issuecomment-2226658271
ERROR: The requested resource requires user authentication: https://dev.azure.com/{ado-org}/_apis/wit/workItems/311

It does create Issues in GH. Not sure what is causing this error or what the issue is.

I think the issue is that the README says an ADO PAT with READ access is needed, but in line 190 the script is writing to ADO to tag the work items.

https://github.com/joshjohanning/ado_workitems_to_github_issues/blob/main/ado_workitems_to_github_issues.ps1#L190

az boards work-item update --id "$workitemId" --fields "System.Tags=copied-to-github; $workitemTags" --discussion "$discussion" | Out-Null;