K
Kinde7mo ago
moroshko

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.
7 Replies
Oli - Kinde
Oli - Kinde7mo 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
moroshkoOP7mo ago
cool, thanks, I'll try that
nerdalert
nerdalert6mo ago
it would be really nice if when you used the Management API to get an Organization the handle that was created came back from the system instead of mapping a custom property to store the handle which already exists as a property on the Organization in your system.
Oli - Kinde
Oli - Kinde6mo ago
Hey @mfraser, Just confirming, would you want the org handle to be in the response of a Get Organization API call?
nerdalert
nerdalert6mo ago
Yes, that would be helpful
Oli - Kinde
Oli - Kinde6mo ago
Gotcha. I have noted this down as a request and passed it onto my team.
nerdalert
nerdalert6mo ago
Thank you!
Want results from more Discord servers?
Add your server