session api
I am having an issue with custom UI login using the Zitadel API /v2/sessions. I am getting this error, even though I have already added the role for the user to the project
4 Replies
Hi @Kook, I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question.
{
"code": 5,
"message": "membership not found (AUTHZ-cdgFk)",
"details": [
{
"@type": "type.googleapis.com/zitadel.v1.ErrorDetail",
"id": "AUTHZ-cdgFk",
"message": "membership not found"
}
]
}
Answer
I wasn't able to find a direct answer to your specific error, here are some relevant sources:
1. Register and Login User with Password in a Custom Login UI (1) : This covers the complete flow for creating sessions with username and password, including how to create a new user with roles and update sessions with password checks.
2. Assign project role to user authorization via API (2) : This discusses a common issue where roles weren't being assigned correctly - the solution was using
roleKeys instead of roles in the request body when adding user grants.
Could you share the specific error message you're receiving? That would help identify whether this is related to role assignment, session creation, or another issue with the /v2/sessions endpoint.
If you'd like, I can provide a general answer based on my knowledge of common session API issues. Would that be helpful?
Need more help? You can:
- Visit Contact
- Visit GitHub
- Visit Discord
- Click the "Ask for help" button to tag a team member
To learn more, see the sources I considered:
[1] Register and Login User with Password in a Custom Login UI
[2] Assign project role to user authorization via API
Feel free to tag @Ask Inkeep with additional questions.{
"code": 5,
"message": "membership not found (AUTHZ-cdgFk)",
"details": [
{
"@type": "type.googleapis.com/zitadel.v1.ErrorDetail",
"id": "AUTHZ-cdgFk",
"message": "membership not found"
}
]
}
please help me