joshjohanning / ado_workitems_to_github_issues

Migrate Azure DevOps work items to GitHub Issues
MIT License
19 stars 10 forks source link

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

Closed askpatrickw closed 1 month ago

askpatrickw commented 1 month ago

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.

askpatrickw commented 1 month ago

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;