Skip to main content
Solved

How te get the tenant_id from the current tsf user

  • October 5, 2022
  • 1 reply
  • 91 views

Forum|alt.badge.img

Hi,

For some business rules we need to know what the tenant_id is for the current logged in user.

How do we achieve this. Is there a way te get additional user data (at least the tenant_id) for use in business logic?

Best answer by Mark Jongeling

Hi Harm-Jan,

Obtaining the tenant_id of the user can be done in a couple of ways, but to be more specific, do you mean the Tenant_id from IAM or is this a Tenant_id that is stored in your own application?

From IAM, you can make use of a session variable (find Session.[session_variable]).

Every IAM application can have an Extended property called Session.tenant_id, with the value equal to the tenant that has access to the application. In case multiple tenants have access to the same application, the tenant_id would have to be specified in the application itself I think.

Hope this helps!

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

1 reply

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3940 replies
  • Answer
  • October 10, 2022

Hi Harm-Jan,

Obtaining the tenant_id of the user can be done in a couple of ways, but to be more specific, do you mean the Tenant_id from IAM or is this a Tenant_id that is stored in your own application?

From IAM, you can make use of a session variable (find Session.[session_variable]).

Every IAM application can have an Extended property called Session.tenant_id, with the value equal to the tenant that has access to the application. In case multiple tenants have access to the same application, the tenant_id would have to be specified in the application itself I think.

Hope this helps!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings