

# UserContext
<a name="API_agent-runtime_UserContext"></a>

Contains information about the user making the request. Use this to pass user identity information for access control filtering, so that retrieval results only include documents the user is authorized to access.

## Contents
<a name="API_agent-runtime_UserContext_Contents"></a>

 ** userId **   <a name="bedrock-Type-agent-runtime_UserContext-userId"></a>
The identifier of the user making the retrieval request.  
Type: String  
Required: Yes

## See Also
<a name="API_agent-runtime_UserContext_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/bedrock-agent-runtime-2023-07-26/UserContext) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/bedrock-agent-runtime-2023-07-26/UserContext) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/bedrock-agent-runtime-2023-07-26/UserContext) 