

# Verify what a user can see

After you configure identity mapping, verify that a given user sees only what they are authorized to see. Query the Agent Context as (or on behalf of) a specific identity and confirm that the returned context matches that identity’s source permissions: source data the identity is authorized for is returned, and data it is not authorized for is withheld. For Snowflake and Databricks, table and column metadata is filtered the same way. Then confirm the access is attributable by locating the corresponding entry in the audit trail (see [CloudTrail logs](monitoring-cloudtrail.md)).

You can’t test another user’s access from your own credentials. To verify, complete the following steps:

1. Sign in as that user, and get AWS credentials that carry the user’s identity. Use IAM Identity Center or an IAM identity provider with trusted identity propagation turned on. For setup, see [How the user’s identity reaches your sources](configure-identity-propagation.md) and [Trusted identity propagation with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_tip.html) in the * IAM User Guide*.

1. With those credentials, call `SearchAgentContext` and `AgenticRetrieve` on the Agent Context. For AWS Glue Data Catalog tables, you can also call `ExecuteSql`.

1. Compare the results with the user’s permissions in each source.

1. If results are missing and the connection uses a data access role, find the `AssumeRole` event for that role in AWS CloudTrail. If `additionalEventData.trustedIdentityPropagationSuppressed` is `true`, the user’s identity didn’t reach the source.