Skip to content

GET /tfe/api/v2/workspaces/ws-demo-project/current-state-version "no organization context found in request" #2432

@victorserbu2709

Description

@victorserbu2709

configured statesman (https://github.com/diggerhq/digger/archive/refs/tags/v0.6.133.tar.gz) with oauth
when i do terraform init i see

[root@develalma9 terraform-demo]# terraform init 
Initializing HCP Terraform...
╷
│ Error: Error refreshing state: error retrieving state: unauthorized
│ 
│
GET /tfe/api/v2/workspaces/ws-demo-project/current-state-version HTTP/1.0
X-Forwarded-Host: digger.test.me
X-Forwarded-Server: digger.test.me
X-Forwarded-For: 10.150.6.153
Host: digger.test.me
X-Real-IP: 10.150.6.153
X-Forwarded-For: 10.150.6.153
X-Forwarded-Proto: https
X-Forwarded-Host: digger.test.me
X-Forwarded-Server: digger.test.me
Connection: close
user-agent: go-tfe
terraform-version: 1.11.4
x-terraform-integration: cloud
authorization: Bearer eyJhbGciOiJFZERTQSIsImtpZCI6InYxIiwidHlwIjoiSldUIn0.eyJzY29wZXMiOlsiYXBpIiwiczMiXSwiZW1haWwiOiJ2aWN0b3JzQHRlc3QubWUiLCJpc3MiOiJodHRwczovL2RpZ2dlci40cHNhLm1lIiwic3ViIjoiMjcxODQ0MTMzNzA5MDIyODcxIiwiYXVkIjpbImFwaSIsInMzIl0sImV4cCI6MTc2MjgwMDc0MSwiaWF0IjoxNzYyNzk3MTQxfQ.VUuAI1qrVMZtbCCMpTR0Pg70lX4gVznki4sIXUFQ2R2I_XW7DLz5wMOLZfR7BNkEERa1zch6ACJF5oKnA9OnCw
accept: application/vnd.api+json
HTTP/1.0 401 Unauthorized
Content-Type: application/vnd.api+json
Tfp-Api-Version: 2.5
Vary: Accept-Encoding
Vary: Origin
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: xOgvNdCCTuhTxlqszhyByMNciAExLrib
X-Terraform-Enterprise-App: Terraform Enterprise
X-Xss-Protection: 1; mode=block
Date: Mon, 10 Nov 2025 18:05:07 GMT
Content-Length: 94

{"detail":"no organization context found in request","error":"Organization context required"}

server logs

v 10 18:12:55 digger digger-statesman[78730]: {"time":"2025-11-10T18:12:55.158174355Z","id":"YqcGZHppUjydaCpFXmAttFbZcjNvESpA","remote_ip":"10.150.6.153","host":"digger.test.me","method":"GET","uri":"/.well-known/terraform.json","user_agent":"HashiCorp Terraform/1.11.4-dev (+https://www.terraform.io)","status":200,"error":"","latency":64951,"latency_human":"64.951µs","bytes_in":0,"bytes_out":353}
Nov 10 18:12:55 digger digger-statesman[78730]: {"time":"2025-11-10T18:12:55.169836561Z","id":"csGXfLDImCZtvpINBWLhAlATiCtujjCy","remote_ip":"10.150.6.153","host":"digger.test.me","method":"GET","uri":"/tfe/api/v2/ping","user_agent":"go-tfe","status":200,"error":"","latency":347713,"latency_human":"347.713µs","bytes_in":0,"bytes_out":16}
Nov 10 18:12:55 digger digger-statesman[78730]: {"time":"2025-11-10T18:12:55.17196918Z","id":"oVZATzeocVHfGSbWysLWpqagLylLAGTZ","remote_ip":"10.150.6.153","host":"digger.test.me","method":"GET","uri":"/tfe/api/v2/organizations/default/entitlement-set","user_agent":"go-tfe","status":200,"error":"","latency":314102,"latency_human":"314.102µs","bytes_in":0,"bytes_out":0}
Nov 10 18:12:55 digger digger-statesman[78730]: GetWorkspace: orgParam=default (identifier only, no display name), workspaceName=demo-project
Nov 10 18:12:55 digger digger-statesman[78730]: GetWorkspace: resolved stateID=0ca04d60-113b-4fce-bffb-4e6f8da9b827/4b4033f3-0058-43f5-aecd-9707132836c4
Nov 10 18:12:55 digger digger-statesman[78730]: GetWorkspace: Extracted unitUUID=4b4033f3-0058-43f5-aecd-9707132836c4 from stateID=0ca04d60-113b-4fce-bffb-4e6f8da9b827/4b4033f3-0058-43f5-aecd-9707132836c4
Nov 10 18:12:55 digger digger-statesman[78730]: {"time":"2025-11-10T18:12:55.19713443Z","id":"JNWupffBOvMUDpGpzsODlzfaLYyRrHgI","remote_ip":"10.150.6.153","host":"digger.test.me","method":"GET","uri":"/tfe/api/v2/organizations/default/workspaces/demo-project","user_agent":"go-tfe","status":200,"error":"","latency":8324296,"latency_human":"8.324296ms","bytes_in":0,"bytes_out":0}
Nov 10 18:12:55 digger digger-statesman[78730]: {"time":"2025-11-10T18:12:55.199545882Z","id":"voRorwJgeYPHBMZAgUzYjQnodqbyGqUp","remote_ip":"10.150.6.153","host":"digger.test.me","method":"GET","uri":"/tfe/api/v2/workspaces/ws-demo-project/current-state-version","user_agent":"go-tfe","status":401,"error":"","latency":136371,"latency_human":"136.371µs","bytes_in":0,"bytes_out":94}

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