getUserOrganizations returning null
I have a user which is part of two organization, but when i call getUserOrganizations it returns null
9 Replies
Hello what SDK are you using and could you share a snippet please?
I am using Nextjs SDK
I want to use Kinde B2B features to create organization for users and make users invite members to organization
Just tried it on my end and even with the user belonging to one org it stills returns null. Lemme tell the team about that
What version of the SDK are you using ?
Hi there. Offering an answer from a similar issue - make sure that you switch on the relevant additional claims in the token settings. See this doc https://docs.kinde.com/build/tokens/token-customization/?r=search#_top
Kinde docs
Token customization
Our developer tools provide everything you need to get started with Kinde.
1. In Kinde, go to Settings > Applications and select Details on your application.
2. Select Tokens, then scroll to the Token customization section.
3. On the Access token card, select Customize. A selection window appears.
4. Select organization name. and Save.
Hi, I also seem to be having some trouble with this. I've made sure that the setting you've recommended is turned on but it's still returning null for me unfortunately.
Is there anything else you recommend trying for this issue?
Ah, I've just seen this: https://github.com/kinde-oss/kinde-auth-nextjs/issues/201
Looks like a fix is on the way
GitHub
Bug: cannot retrieve organization details · Issue #201 · kinde-oss/...
Prerequisites I have searched the repository’s issues and Kinde community to ensure my issue isn’t a duplicate I have checked the latest version of the library to replicate my issue I have read the...
@Joel try out to set the ID Token
Organizations (array)
on, that worked for me