Hi everyone! We have custom attributes set for our...
# ask-a-descoper
y
Hi everyone! We have custom attributes set for our tenants in a Descope console. Is there a way to get those values through React SDK? We're using user.userTenants field from useUser hook for tenants list, no custom attributes are there. Also tried myTenants from useDescope hook - customAttributes field is there, but has null value
c
We don't return all the details of the tenant custom items under the useUser hook due to data sizing. Most of that data is part of the JWT in general, and then used by the SDK to populate certain fields. What custom attributes for the tenant are you wanting to use in your frontend? I'd suggest using a claim for any of the pertinent tenant data within either a flow action to add custom claims, or within the JWT template.
y
Thanks for the answer, it appeared we're able to get needed data with out internal API (which is based on Descope's API in this case), so we don't have to use hooks or flows