Open dantest21 opened 9 months ago
Not directly an answer to your question, but since you are using express/js, I'd recommend using the authentik API client: https://www.npmjs.com/package/@goauthentik/api. This should also take care of any kind of encoding for search queries like that
I am developing a custom frontend for user management, using Express (Node.js) and Python, designed to integrate seamlessly with Authentik. However, I've encountered an issue related to search queries with pagination and custom attributes, specifically the 'admin_group' attribute.
Issue Description: My application needs to send search requests to Authentik that include pagination details and a custom attribute, 'admin_group'. The query needs to be formatted as ?attributes={"admin_group":true} or ?attributes={"admin_group":false} in the URL.
Encountered Problem: The issue arises when these attributes are URL-encoded, resulting in a format like attributes=%7B%22admin_group%22%3A%20true%7D. It seems that Authentik does not process or recognize this encoded format as expected.
Technical Context:
Frontend Development: Utilizing Express (Node.js) and Python. Integration Objective: Effective communication with Authentik for user management functionalities. Specific Requirement: Ensuring the 'admin_group' attribute in search queries is correctly formatted and processed by Authentik. "Input should be a valid dictionary or object to extract fields from"
/api/v3/core/groups/?page=1&attributes=%7B"admin_group"%3A%20false%7D
Request for Assistance: I am seeking insights, guidance, or potential solutions on how to format these search queries appropriately. Any advice or alternative approaches to pass the 'admin_group' attribute effectively in a manner that Authentik can process would be greatly appreciated.
Thank you for your support and guidance in resolving this challenge. I look forward to your valuable input.