Issue with indicating tenant id when doing any action/creating an object

Feature(s) impacted

Observed behavior

Expected behavior

Failure Logs

Started POST “/forest/User?timezone=America%2FNew_York” for ::1 at 2025-09-16 11:41:52 -0400
Processing by ForestLiana::UserSpace::UserController#create as JSON
Parameters: {“data”=>{“attributes”=>{“admin”=>nil, “email”=>“monica@test1.com”, “first_name”=>“Monica”, “gender”=>“neutral”, “last_name”=>“Test”, “mail_time”=>“9:00 am”, “title”=>“Test User”}, “relationships”=>{“organization”=>{“data”=>{“type”=>“Organizations”, “id”=>“ba5b4b16-3602-449e-abc4-56c8bc90a2c4”}}}, “type”=>“Users”}, “timezone”=>“America/New_York”, “collection”=>“User”}
Organization Load (0.7ms) SELECT “organizations”.* FROM “organizations” WHERE “organizations”.“id” = $1 LIMIT $2 [[“id”, “ba5b4b16-3602-449e-abc4-56c8bc90a2c4”], [“LIMIT”, 1]]
↳ config/initializers/action_controller.rb:8:in block in scope_tenant' TRANSACTION (0.2ms) BEGIN ↳ config/initializers/action_controller.rb:8:in block in scope_tenant’
User Exists? (0.5ms) SELECT 1 AS one FROM “users” WHERE “users”.“email” = $1 AND “users”.“tenant_id” = $2 LIMIT $3 [[“email”, “monica@test1.com”], [“tenant_id”, “northwestern”], [“LIMIT”, 1]]
↳ config/initializers/action_controller.rb:8:in block in scope_tenant' Organization Load (0.3ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."subdomain" = $1 LIMIT $2 [["subdomain", "northwestern"], ["LIMIT", 1]] ↳ app/models/user.rb:1054:in set_default_user_values’
User Create (1.9ms) INSERT INTO “users” (“admin”, “created_at”, “email”, “first_name”, “frequency”, “gender”, “jti”, “last_name”, “password_digest”, “preferences”, “rate_load”, “tenant”, “tenant_id”, “title”, “uid”, “updated_at”) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16) RETURNING “id” [[“admin”, nil], [“created_at”, “2025-09-16 11:41:54.136760”], [“email”, “monica@test1.com”], [“first_name”, “Monica”], [“frequency”, 3], [“gender”, 2], [“jti”, “gFY6dxnvKggnIdCoLWa0DQ==”], [“last_name”, “Test”], [“password_digest”, “$2a$10$w9eS.HHyOZ5QpjOBaiSA9.oBkiJYn2ngc3PrplgwgbHVqMblb6OlO”], [“preferences”, “{"feedback_delivery":["email"],"slack_notification_time":"09:00 am","maintenance_tutorial_viewed":false,"onboarding_tutorial_viewed":false,"linked_in_dismissed":false,"password_set":false,"self_onboard":true,"initial_config":false,"opted_in_new_manager_dashboard":false}”], [“rate_load”, 5], [“tenant”, “northwestern”], [“tenant_id”, “northwestern”], [“title”, “Test User”], [“uid”, “monica@test1.com”], [“updated_at”, “2025-09-16 11:41:54.136760”]]
↳ config/initializers/action_controller.rb:8:in block in scope_tenant' PaperTrail::Version Create (3.3ms) INSERT INTO "versions" ("created_at", "event", "item_id", "item_type", "object_changes", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2025-09-16 11:41:54.136760"], ["event", "create"], ["item_id", 9], ["item_type", "User"], ["object_changes", "---\nid:\n-\n- 9b322ad7-406e-4feb-aca5-9cc8af81cb7d\nadmin:\n- false\n-\ncreated_at:\n-\n- 2025-09-16 11:41:54.136760000 -04:00\nemail:\n-\n- monica@test1.com\nfirst_name:\n-\n- Monica\nfrequency:\n-\n- 3\ngender:\n-\n- 2\njti:\n-\n- gFY6dxnvKggnIdCoLWa0DQ==\nlast_name:\n-\n- Test\npassword_digest:\n-\n- \"$2a$10$w9eS.HHyOZ5QpjOBaiSA9.oBkiJYn2ngc3PrplgwgbHVqMblb6OlO\"\npreferences:\n- \"{}\"\n- '{\"feedback_delivery\":[\"email\"],\"slack_notification_time\":\"09:00 am\",\"maintenance_tutorial_viewed\":false,\"onboarding_tutorial_viewed\":false,\"linked_in_dismissed\":false,\"password_set\":false,\"self_onboard\":true,\"initial_config\":false,\"opted_in_new_manager_dashboard\":false}'\nrate_load:\n- 0\n- 5\ntenant:\n-\n- northwestern\ntenant_id:\n-\n- northwestern\ntitle:\n-\n- Test User\nuid:\n-\n- monica@test1.com\n"], ["whodunnit", "mliangzheng@humareso.com"]] ↳ config/initializers/action_controller.rb:8:in block in scope_tenant’
Organization Load (0.5ms) SELECT “organizations”.* FROM “organizations” WHERE “organizations”.“subdomain” = $1 LIMIT $2 [[“subdomain”, “public”], [“LIMIT”, 1]]
↳ app/models/organization.rb:337:in current' TRANSACTION (0.2ms) ROLLBACK ↳ config/initializers/action_controller.rb:8:in block in scope_tenant’
Completed 400 Bad Request in 1349ms (Views: 0.1ms | ActiveRecord: 25.8ms | Allocations: 118370)

Context

Project Name: Rhabit
Team name: Operations
Environment Name: Production
Database Type: Postgres
Recent changes: Upgraded ruby version to 3.2.2, saw this bug occur once we updated.

  • Project Name: Rhabit
  • Team name: Operations
  • Environment Name: Production
  • Database Type: Postgres
  • Recent changes: Upgraded ruby version to 3.2.2, saw this bug occur once we updated.

And, if you are self-hosting your agent:

Hello, first of all, can you update your agent to the latest official version and try again.