rdalbuquerque / azdoext

MIT License
10 stars 0 forks source link

panic: user id not found #6

Closed hoppalazi closed 1 month ago

hoppalazi commented 1 month ago

Hey, got another issue when using a Azure DevOps PAT directly:

panic: user id not found

goroutine 30 [running]:
azdoext/pkgs/azdo.getAccountId({0xc0004be026, 0xf}, {0xc0004ce180?, 0xc000670010?})
/home/runner/work/azdoext/azdoext/pkgs/azdo/config.go:117 +0x509
azdoext/pkgs/azdo.GetAzdoConfig({0xc0004be000, 0x5d}, {0xc000670010, 0x5})
/home/runner/work/azdoext/azdoext/pkgs/azdo/config.go:42 +0x146
main.(*model).Init.getAzdoConfig.func1()
/home/runner/work/azdoext/azdoext/main.go:69 +0x2a
github.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1()
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.25.0/tea.go:294 +0x29
created by github.com/charmbracelet/bubbletea.(*Program).handleCommands.func1 in goroutine 28
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.25.0/tea.go:293 +0x139

I'm trying to use a PAT with full access: image

If i use not a PAT, but instead set the access token with following snippet

$env:AZDO_PERSONAL_ACCESS_TOKEN = Get-AzAccessToken -ResourceUrl 499b84ac-1321-427f-aa17-267ca6975798 | Select-Object -ExpandProperty Token

, then i get no error at launching azdoext, but i'm not seeing the pipelines either.

hoppalazi commented 1 month ago

Not an issue, just an user error. At creating an access token for all organizations, it still defaulted to one default organization and i missed that. Sorry for bothering you with that.