From f5c00b66b11bf3a3f1822f620cf4100a930f2a13 Mon Sep 17 00:00:00 2001 From: Gert Drapers <1533850+gertd@users.noreply.github.com> Date: Thu, 15 Aug 2024 22:58:43 -0700 Subject: [PATCH] fix tenant switching (#72) * fix tenant switching * rm TenantID type * topaz v0.32.23 * add tenantOption fallback --- pkg/cc/clients/options.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/cc/clients/options.go b/pkg/cc/clients/options.go index fc553c7..cace158 100644 --- a/pkg/cc/clients/options.go +++ b/pkg/cc/clients/options.go @@ -116,6 +116,10 @@ func (c *optionsBuilder) tenantOption() (client.ConnectionOption, error) { return client.WithTenantID(c.tenantID), nil } + if c.token.TenantID() != "" { + return client.WithTenantID(c.token.TenantID()), nil + } + if !c.isHosted() { return nilOption, nil }