GitHub user dosubot[bot] added a comment to the discussion: How to obtain 
guest_token for embedded-sdk after integrating Azure OAUTH?

<!-- Answer -->
To obtain a CSRF token when OAUTH is enabled in Superset, you can make a GET 
request to the `/api/v1/security/csrf_token/` endpoint. This is typically 
handled by the `SupersetClient` class, which provides a method `getCSRFToken` 
to fetch the token. Ensure you are logged in before attempting to fetch the 
CSRF token, as a valid login session is required. Additionally, make sure you 
have the necessary "read" permission to access this endpoint 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset/security/api.py)</sup><sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/src/connection/SupersetClientClass.ts)</sup><sup>[[3]](https://github.com/apache/superset/blob/master/tests/integration_tests/security/api_tests.py)</sup>.


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*

---
<sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/bfec1d68-56eb-4167-88d1-06cedee72b8f?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/bfec1d68-56eb-4167-88d1-06cedee72b8f?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/bfec1d68-56eb-4167-88d1-06cedee72b8f?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/bfec1d68-56eb-4167-88d1-06cedee72b8f?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/bfec1d68-56eb-4167-88d1-06cedee72b8f?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/bfec1d68-56eb-4167-88d1-06cedee72b8f?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/bfec1d68-56eb-4167-88d1-06cedee72b8f?feedback_type=other)</sup>


GitHub link: 
https://github.com/apache/superset/discussions/33065#discussioncomment-12782193

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: 
notifications-unsubscr...@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to