Verify control over retrieval of conversation history and feedback by READ UNREDACTED AI OBSERVABILITY EVENTS TABLE permission

Verify control over retrieval of conversation history and feedback by READ UNREDACTED AI OBSERVABILITY EVENTS TABLE permission

Introducing the new READ UNREDACTED AI OBSERVABILITY EVENTS TABLE permission, which controls access to full tool inputs and outputs, full conversation text, and user feedback text in raw AI Observability data.
2026.05.06

This page has been translated by machine translation. View original

I'm Suzuki from the Data Business Division.

Starting April 24, 2026, a new account privilege, READ UNREDACTED AI OBSERVABILITY EVENTS TABLE, has been added.
https://docs.snowflake.com/en/release-notes/bcr-bundles/un-bundled/bcr-read-unredacted-ai-observability-events

With this change, roles that have not been granted this privilege can no longer retrieve the full tool inputs and outputs, the full conversation text, and the user feedback text from SNOWFLAKE.LOCAL.AI_OBSERVABILITY_EVENTS.

I happened to be testing how to check Cortex Agents conversation history and feedback, and I was wondering, "Huh, I can't get the conversation history or feedback content anymore."
After adding this privilege I could see them again, so I'll show an example of granting it.

Retrieving Cortex Agents conversation history and feedback

The raw data of AI Observability is stored in SNOWFLAKE.LOCAL.AI_OBSERVABILITY_EVENTS. With the addition of READ UNREDACTED AI OBSERVABILITY EVENTS TABLE, on top of the privilege grants required until now, it is now possible to configure security settings for retrieving the full tool inputs and outputs, the full conversation text, and the user feedback text.

https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-monitor

In SQL, conversation history and feedback can be retrieved with GET_AI_OBSERVABILITY_EVENTS.

For example, the documentation shows that user feedback can be retrieved as follows.

-- https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-monitor
SELECT *
  FROM TABLE(SNOWFLAKE.LOCAL.GET_AI_OBSERVABILITY_EVENTS(
    '<database_name>',
    '<schema_name>',
    '<agent_name>',
    'CORTEX AGENT'
  ))
  WHERE RECORD:name = 'CORTEX_AGENT_FEEDBACK';

This time, I'll check how the query results change depending on whether the READ UNREDACTED AI OBSERVABILITY EVENTS TABLE privilege is present.

Preparation

I created two agents for checking the logs: AI_OBSERVABILITY_TEST_AGENT1 and AI_OBSERVABILITY_TEST_AGENT2.

Created agents

I created conversations and feedback for each of them.

▼Agent 1

Conversation with Agent 1

Feedback for Agent 1

▼Agent 2

Conversation and feedback for Agent 2

I created an AI_OBSERVABILITY_ROLE role for running the queries.
First, I granted it the full set of privileges.

-- ロールを作成
USE ROLE SECURITYADMIN;
CREATE ROLE IF NOT EXISTS AI_OBSERVABILITY_ROLE;

-- Snowflake Cortexの機能へのアクセス権(デフォルトでPUBLICロールに付与)
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER
  TO ROLE AI_OBSERVABILITY_ROLE;

-- エージェント1のMONITOR権
GRANT USAGE ON DATABASE エージェントのあるデータベース名 TO ROLE AI_OBSERVABILITY_ROLE;
GRANT USAGE ON SCHEMA エージェントのあるデータベース名.エージェントのあるスキーマ名 TO ROLE AI_OBSERVABILITY_ROLE;
GRANT MONITOR ON AGENT エージェントのあるデータベース名.エージェントのあるスキーマ名.AI_OBSERVABILITY_TEST_AGENT1
  TO ROLE AI_OBSERVABILITY_ROLE;

-- READ UNREDACTED AI OBSERVABILITY EVENTS TABLE付与
USE ROLE ACCOUNTADMIN;
GRANT READ UNREDACTED AI OBSERVABILITY EVENTS TABLE
  ON ACCOUNT
  TO ROLE AI_OBSERVABILITY_ROLE;

The privileges were granted as follows.

Granted privileges

Results of GET_AI_OBSERVABILITY_EVENTS

I checked whether the visibility of conversation history and feedback changes depending on the presence of READ UNREDACTED AI OBSERVABILITY EVENTS TABLE.

When the READ UNREDACTED AI OBSERVABILITY EVENTS TABLE privilege is granted

I was able to see the conversation history and feedback as shown below.

SELECT
  *
FROM TABLE(
  SNOWFLAKE.LOCAL.GET_AI_OBSERVABILITY_EVENTS(
    'エージェントのあるデータベース名',
    'エージェントのあるスキーマ名',
    'エージェント名',
    'CORTEX AGENT'
  )
);

Query result with the privilege granted

When the READ UNREDACTED AI OBSERVABILITY EVENTS TABLE privilege is not granted

I revoked READ UNREDACTED AI OBSERVABILITY EVENTS TABLE as follows and then tried again.

--READ UNREDACTED AI OBSERVABILITY EVENTS TABLEを取り消し
USE ROLE ACCOUNTADMIN;
REVOKE READ UNREDACTED AI OBSERVABILITY EVENTS TABLE
  ON ACCOUNT
  FROM ROLE AI_OBSERVABILITY_ROLE;

The query result changed, and the conversation history and feedback were not displayed.

Query result without the privilege

Additional notes

Behavior when MONITOR is not granted

The previous example checked the difference in query results with and without READ UNREDACTED AI OBSERVABILITY EVENTS TABLE for an agent on which the role has the MONITOR privilege. Here I'll also check whether the information displayed changes depending on the presence of privileges such as MONITOR when READ UNREDACTED AI OBSERVABILITY EVENTS TABLE is present.

Because MONITOR was not granted on Agent 2, the logs could not be queried even with READ UNREDACTED AI OBSERVABILITY EVENTS TABLE.

Agent 2 cannot be queried

Granting USAGE did not make it queryable either.

-- エージェント AI_OBSERVABILITY_TEST_AGENT2 向けのUSAGE権限
GRANT USAGE ON AGENT DA_ML_DB.SAMPLE_SCHEMA.AI_OBSERVABILITY_TEST_AGENT2
  TO ROLE AI_OBSERVABILITY_ROLE;

Agent 2 cannot be queried 2

At this point, in Snowsight, the agent's Monitoring tab displayed a message asking to grant MONITOR or OWNERSHIP.

Agent 2's Monitoring tab cannot be displayed

Once I granted MONITOR, it was displayed.

-- エージェント AI_OBSERVABILITY_TEST_AGENT2 向けのUSAGE権限
GRANT MONITOR ON AGENT データべース名.スキーマ名.AI_OBSERVABILITY_TEST_AGENT2
  TO ROLE AI_OBSERVABILITY_ROLE;

It can be displayed once MONITOR is granted

Query to retrieve the conversation history of a specific agent

So far I only checked whether the query results of SNOWFLAKE.LOCAL.GET_AI_OBSERVABILITY_EVENTS could be retrieved, but I'll also introduce a query that has been processed a bit more for practical use.

For example, the following worked nicely for retrieving the conversation history.

WITH src AS (
  SELECT
    TIMESTAMP,
    RECORD:name::STRING AS event_name,
    RECORD_TYPE,
    RECORD_ATTRIBUTES:"snow.ai.observability.agent.thread_id"::NUMBER AS thread_id,
    PARSE_JSON(VALUE:"snow.ai.observability.response") AS response_json,
    VALUE:"snow.ai.observability.request_body" AS request_body
  FROM TABLE(
    SNOWFLAKE.LOCAL.GET_AI_OBSERVABILITY_EVENTS(
      'データベース名',
      'スキーマ名',
      'エージェント名',
      'CORTEX AGENT'
    )
  )
  WHERE RECORD_ATTRIBUTES:"snow.ai.observability.agent.thread_id" IS NOT NULL
    AND event_name = 'CORTEX_AGENT_REQUEST'
)
SELECT
  TIMESTAMP,
  thread_id,
  request_body:messages[0]:content[0]:text::string AS input_text,
  f.value:text::STRING AS output_text
FROM src,
LATERAL FLATTEN(input => response_json:content) f
WHERE f.value:type::STRING = 'text'
ORDER BY TIMESTAMP DESC;

Example of retrieving conversation history

Without READ UNREDACTED AI OBSERVABILITY EVENTS TABLE, no records were displayed.

Conversation history when privileges are insufficient

Query to retrieve the feedback of a specific agent

For example, the following worked nicely for retrieving the conversation history.

WITH base AS (
  SELECT
    *
  FROM TABLE(
    SNOWFLAKE.LOCAL.GET_AI_OBSERVABILITY_EVENTS(
      'データベース名',
      'スキーマ名',
      'エージェント名',
      'CORTEX AGENT'
    )
  )
  WHERE RECORD_ATTRIBUTES:"snow.ai.observability.agent.thread_id" IS NOT NULL
)
  SELECT
    TIMESTAMP AS feedback_timestamp,
    RECORD_ATTRIBUTES:"ai.observability.record_id"::STRING AS feedback_record_id,
    RECORD_ATTRIBUTES:"snow.ai.observability.agent.thread_id"::NUMBER AS thread_id,
    RECORD_ATTRIBUTES:"snow.ai.observability.user.name"::STRING AS feedback_user_name,
    VALUE:"positive"::BOOLEAN AS positive,
    VALUE:"feedback_message"::STRING AS feedback_message
  FROM base
  WHERE RECORD:name::STRING = 'CORTEX_AGENT_FEEDBACK';

Example of retrieving feedback

Without READ UNREDACTED AI OBSERVABILITY EVENTS TABLE, the feedback content was not displayed.

Feedback when privileges are insufficient

Conclusion

This was an introduction to READ UNREDACTED AI OBSERVABILITY EVENTS TABLE, the account privilege newly added on April 24, 2026.
I hope you found it helpful.


Snowflakeの導入支援はクラスメソッドに!

クラスメソッドでは Snowflake の導入を支援しております。
製品の詳細や支援の内容についてお気軽にお問い合わせください。

Snowflakeの詳細を見る

Share this article