N8N - authentication

Is it possible to identify the user executing the flow within a custom node? Currently, I use SSO and SAML authentication. ?

Yes, you can identify the user executing a workflow in n8n. When using SSO/SAML, the authenticated user’s details are available in the execution context. Here’s how to access it:

* In custom nodes, use `this.getCurrentUser()` to get the executing user’s ID and email

* For workflow-level access, use the `$user` variable in expressions (e.g., `{{$user.id}}`)

This works with all authentication methods including SSO/SAML. [n8npro.in](n8n Community SSO: Your Guide to Setup & Workarounds) confirms SSO user details are properly passed to n8n’s execution context.