Struct TokenRequestContext | Azure SDK for .NET
Rachel Davis
Published Feb 16, 2026
Contains the details of an authentication token request.
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Core.dll
Syntax
public struct TokenRequestContext Constructors
TokenRequestContext(String[], String)
Creates a new TokenRequest with the specified scopes.
Declaration
public TokenRequestContext (string[] scopes, string parentRequestId); Parameters
| System.String[] scopes The scopes required for the token. |
| System.String parentRequestId The ClientRequestId of the request requiring a token for authentication, if applicable. |
TokenRequestContext(String[], String, String)
Creates a new TokenRequest with the specified scopes.
Declaration
public TokenRequestContext (string[] scopes, string parentRequestId, string claims); Parameters
| System.String[] scopes The scopes required for the token. |
| System.String parentRequestId The ClientRequestId of the request requiring a token for authentication, if applicable. |
| System.String claims Additional claims to be included in the token. |
TokenRequestContext(String[], String, String, String)
Creates a new TokenRequest with the specified scopes.
Declaration
public TokenRequestContext (string[] scopes, string parentRequestId, string claims, string tenantId); Parameters
| System.String[] scopes The scopes required for the token. |
| System.String parentRequestId The ClientRequestId of the request requiring a token for authentication, if applicable. |
| System.String claims Additional claims to be included in the token. |
| System.String tenantId The tenantId to be included in the token request. |
TokenRequestContext(String[], String, String, String, Boolean)
Creates a new TokenRequest with the specified scopes.
Declaration
public TokenRequestContext (string[] scopes, string parentRequestId = null, string claims = null, string tenantId = null, bool isCaeEnabled = false); Parameters
| System.String[] scopes The scopes required for the token. |
| System.String parentRequestId The ClientRequestId of the request requiring a token for authentication, if applicable. |
| System.String claims Additional claims to be included in the token. |
| System.String tenantId The tenantId to be included in the token request. |
| System.Boolean isCaeEnabled Indicates whether to enable Continuous Access Evaluation (CAE) for the requested token. |
Properties
Claims
Declaration
public string Claims { get; } Property Value
| System.String |
IsCaeEnabled
Indicates whether to enable Continuous Access Evaluation (CAE) for the requested token.
Declaration
public bool IsCaeEnabled { get; } Property Value
| System.Boolean |
ParentRequestId
The ClientRequestId of the request requiring a token for authentication, if applicable.
Declaration
public string ParentRequestId { get; } Property Value
| System.String |
Scopes
The scopes required for the token.
Declaration
public string[] Scopes { get; } Property Value
| System.String[] |
TenantId
The tenantId to be included in the token request.
Declaration
public string TenantId { get; } Property Value
| System.String |