K
Kindemoroshko

Getting organization handle in id token claims

When user visits myapp.com/org-handle, I'd like to check whether the user has access to the org-handle organization, and if so, show them the page. I found how to add organizations to the id token claims, but this array contains the org id and name only. I'd like the org handle to be there. Is this possible? If not, what's the recommended way to check whether the user has access to a specific org given an org handle? I also tried to fetch the list of all organizations using the Management API, but the handle is not returned there either.
Oli - Kinde
Oli - Kinde18d ago
Hi @moroshko, I would suggest creating an org handle organization custom property and populate the custom property with the org handles. And then add the custom property value to the tokens. Let me know if you have any other questions.
moroshko
moroshko18d ago
cool, thanks, I'll try that