cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is user session information already available in Grail?

Jorge3229
Contributor

Hello everyone, good afternoon. I'd like to ask if you know if it's possible to query user session information from Grail?

Running the fetch command, I see that user.sessions exists in the suggestions, and I tried to read the information, but it showed a permissions error. I've already created a policy and added that policy to a group where my user is assigned, and now it only shows that there are no records.

This was the error message that was showing me:

"{
  "error": {
    "message": "NOT_AUTHORIZED_FOR_TABLE",
    "details": {
      "exceptionType": "DQL-AUTHORIZATION",
      "errorType": "NOT_AUTHORIZED_FOR_TABLE",
      "errorMessage": "Insufficient permission to access table (user.sessions).",
      "arguments": [
        "user.sessions"
      ],
      "queryString": "fetch user.sessions\n| filter (useraction.application == \"ONE\" or userevent.application == \"ONE\" or usererror.application == \"ONE\")\n| summarize session_count = count(), by:{user.id}\n| sort session_count desc\n",
      "errorMessageFormatSpecifierTypes": [
        "GENERAL_MESSAGE"
      ],
      "errorMessageFormat": "Insufficient permission to access table (%1$s).",
      "queryId": "471f733c-880d-41c4-9e16-890e1cdcbb0b"
    },
    "code": 403
  }
}"

This is the policy I added

Jorge3229_0-1752694054728.png

and this is what appears to me now when executing the dql

Captura de pantalla 2025-07-16 132424.png

Jorge3229_1-1752694111457.png

Has anyone already worked with that information?


Thank you

2 REPLIES 2

Thank you so much

Featured Posts