I keep getting this error: “client requires organization membership, but user does not belong to any organization”
I’m guessing this is not a configuration error, but rather probably my stupidity in setting it up on the dashboard. But I couldn’t find the solution anywhere.
I’m trying to change my apps user type from “individuals” to “organizations”.
Here are the steps that I took:
[I started from scratch to make these steps easy to reproduce]
- Create a new tenant
- Follow the guide, set up a new Next.JS “Regular Web Application”
- Download and use the example app provided in the guide
- Follow the steps in the guide (callback uri, logout uri, etc)
- Create a new user in user management
— Checkpoint—
Now everything works normally. I run the app, try logging in and login succeeds, and user data + profile pic is shown. All is good.
Now, lets try moving to organizations instead of individual:
- Create a new organization (called ‘test’)
- In Applications, choose your application and go to the “organizations” tab
- Under “Types of Users” try to choose “Buisness”
- Realize that this doesn’t work (option is disabled) because you have this warning on the top of the page:
This application has Client Credentials , MFA , Password , and/or Password OTP grants enabled. These grants are currently not supported when the application is accessed by team members of organizations. Learn MoreThis application has Client Credentials, MFA, Password, and/or Password OTP grants enabled. These grants are currently not supported when the application is accessed by team members of organizations. Learn More
- Click on the “Disable Grants Now” button because that seems like the only option
- Now you can click business
- Go back to the organization, and add your test user as a member
- Verify 9 million times that you actually added them as a member
- Try to log in
- You will get this error:
CallbackHandlerError: Callback handler failed. CAUSE: invalid_request (client requires organization membership, but user does not belong to any organization)