Microsoft.Identity.Client Contains information about a single account. A user can be present in multiple directories and thus have multiple accounts. This information is used for token cache lookup and enforcing the user session on the STS authorize endpoint. Constructor for the account instance. Home account ID in "uid.utid" format; can be null, for example when migrating the ADAL v3 cache. UPN-style, can be null Identity provider for the account, e.g., login.microsoftonline.com. Map of (client_id, wam_account_id) Map of (tenant_id, tenant_profile) Gets the username associated with the account. For example, account@example.com. Gets the environment associated with the account. For example, login.microsoftonline.com. Gets additional account identifiers, such as object ID, tenant ID, and the unique identifier. Gets the list of tenant profiles. The same account can exist in its home tenant and also as a guest in multiple other tenants. A is derived from the ID token for that tenant. Gets a dictionary representing the mapping between the requesting client ID and the unique account ID. Extension methods for The same account can exist in its home tenant and also as a guest in multiple other tenants. is derived from the ID token for that tenant. Only tenants for which a token was acquired will be available in property. An identifier for an account in a specific tenant. Returned by Unique identifier for the account For the Microsoft identity platform (formerly named Azure AD v2.0), the identifier is the concatenation of and separated by a period. Unlike in ADAL.NET, these two segments are no longer base64-encoded. Note that there are some legitimate cases (for instance domain takeover) where the same ObjectId may show up in multiple tenants. For Microsoft Entra ID, a string representation for a GUID which is the object ID of the user owning the account in the tenant For Microsoft Entra ID, a string representation for a GUID which is the ID of the tenant where the account resides. Constructor for an account ID. Unique identifier for the account. A string representation for a GUID which is the ID of the user owning the account in the tenant. A string representation for a GUID which is the ID of the tenant where the account resides. Constructor of an AccountId meant for Active Directory Federation Services (ADFS) scenarios since ADFS instances lack tenant IDs. Unique identifier for the account if authority is ADFS. Two accounts are equal when their properties match. GetHashCode implementation to match . Textual description of an . Default constructor for AbstractAcquireTokenParameterBuilder. Specifies which scopes to request. This method is used when your application needs to specify the scopes needed to call a protected API. See https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent to learn more about scopes, permissions and consent, and https://docs.microsoft.com/azure/active-directory/develop/msal-v1-app-scopes to learn how to create scopes for legacy applications which used to expose OAuth2 permissions. Scopes requested to access a protected API The builder to chain the .With methods. Sets Extra Query Parameters for the query string in the HTTP authentication request. This parameter will be appended as is to the query string in the HTTP authentication request to the authority as a string of segments of the form key=value separated by an ampersand character. The parameter can be null. The builder to chain the .With methods. Sets claims in the query. Use when the AAD admin has enabled conditional access. Acquiring the token normally will result in a with the property set. Retry the token acquisition, and use this value in the method. See https://aka.ms/msal-exceptions for details as well as https://aka.ms/msal-net-claim-challenge. A string with one or multiple claims. The builder to chain .With methods. Sets Extra Query Parameters for the query string in the HTTP authentication request. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. The string needs to be properly URL-encoded and ready to send as a string of segments of the form key=value separated by an ampersand character. The builder to chain .With methods. Important: Use WithTenantId or WithTenantIdFromAuthority instead, or WithB2CAuthority for B2C authorities. Specific authority for which the token is requested. Passing a different value than configured at the application constructor narrows down the selection to a specific tenant. This does not change the configured value in the application. This is specific to applications managing several accounts (like a mail client with several mailboxes). See https://aka.ms/msal-net-application-configuration. Uri for the authority. In the case when the authority URI is a known Azure AD URI, this setting needs to be consistent with what is declared in the application registration portal. Whether the authority should be validated against the server metadata. The builder to chain the .With methods. Important: Use WithTenantId or WithTenantIdFromAuthority instead, or WithB2CAuthority for B2C authorities. Adds a known Azure AD authority to the application to sign-in users from a single organization (single tenant application) specified by its tenant ID. See https://aka.ms/msal-net-application-configuration. Azure Cloud instance. GUID of the tenant from which to sign-in users. Whether the authority should be validated against the server metadata. The builder to chain the .With methods. Important: Use WithTenantId or WithTenantIdFromAuthority instead, or WithB2CAuthority for B2C authorities. Adds a known Azure AD authority to the application to sign-in users from a single organization (single tenant application) described by its domain name. See https://aka.ms/msal-net-application-configuration. Uri to the Azure Cloud instance (for instance https://login.microsoftonline.com). Tenant Id associated with the tenant from which to sign-in users. Whether the authority should be validated against the server metadata. can also contain the string representation of a GUID (tenantId), or even common, organizations or consumers but in this case it's recommended to use another override ( and The builder to chain the .With methods. Important: Use WithTenantId or WithTenantIdFromAuthority instead, or WithB2CAuthority for B2C authorities. Adds a known Azure AD authority to the application to sign-in users from a single organization (single tenant application) described by its cloud instance and its tenant ID. See https://aka.ms/msal-net-application-configuration. Instance of Azure Cloud (for instance Azure worldwide cloud, Azure German Cloud, US government ...). Tenant Id of the tenant from which to sign-in users. Whether the authority should be validated against the server metadata. The builder to chain the .With methods. Important: Use WithTenantId or WithTenantIdFromAuthority instead, or WithB2CAuthority for B2C authorities. Adds a known Azure AD authority to the application to sign-in users from a single organization (single tenant application) described by its cloud instance and its domain name or tenant ID. See https://aka.ms/msal-net-application-configuration. Instance of Azure Cloud (for instance Azure worldwide cloud, Azure German Cloud, US government ...). Tenant Id of the tenant from which to sign-in users. This can also be a GUID. Whether the authority should be validated against the server metadata. The builder to chain the .With methods. Adds a known Azure AD authority to the application to sign-in users specifying the cloud instance and the sign-in audience. See https://aka.ms/msal-net-application-configuration. Instance of Azure Cloud (for instance Azure worldwide cloud, Azure German Cloud, US government ...). Sign-in audience (one AAD organization, any work and school accounts, or any work and school accounts and Microsoft personal accounts. Whether the authority should be validated against the server metadata. The builder to chain the .With methods. Important: Use WithTenantId or WithTenantIdFromAuthority instead, or WithB2CAuthority for B2C authorities. Adds a known Azure AD authority to the application to sign-in users specifying the sign-in audience (the cloud being the Azure public cloud). See https://aka.ms/msal-net-application-configuration. Sign-in audience (one AAD organization, any work and school accounts, or any work and school accounts and Microsoft personal accounts. Whether the authority should be validated against the server metadata. The builder to chain the .With methods. Overrides the tenant ID specified in the authority at the application level. This operation preserves the authority host (environment). If an authority was not specified at the application level, the default used is `https://login.microsoftonline.com/common`. Tenant ID of the Microsoft Entra ID tenant or a domain associated with this Microsoft Entra ID tenant, in order to sign-in a user of a specific organization only. The builder to chain the .With methods. Thrown if is null or an empty string. Thrown if is not well-formatted (for example, has spaces). Thrown in more general exception scenarios (for ex. if the application was configured with an authority that does not allow tenants). The tenant should be more restrictive than the one configured at the application level, e.g. don't use "common". Does not affect authority validation, which is specified at the application level. Extracts the tenant ID from the provided authority URI and overrides the tenant ID specified in the authority at the application level. This operation preserves the authority host (environment) provided to the application builder. If an authority was not provided to the application builder, this method will replace the tenant ID in the default authority - `https://login.microsoftonline.com/common`. URI from which to extract the tenant ID The builder to chain the .With methods. Thrown if is null or an empty string. Thrown if is not well-formatted (for example, has spaces). Thrown in general exception scenarios (for example if the application was configured with an authority that does not allow tenants). The tenant should be more restrictive than the one configured at the application level, e.g. don't use "common". Does not affect authority validation, which is specified at the application level. Adds a known Authority corresponding to an ADFS server. See https://aka.ms/msal-net-adfs. Authority URL for an ADFS server. Whether the authority should be validated against the server metadata. MSAL.NET supports ADFS 2019 or later. The builder to chain the .With methods. Adds a known authority corresponding to an Azure AD B2C policy. See https://aka.ms/msal-net-b2c-specificities Azure AD B2C authority, including the B2C policy (for instance "https://fabrikamb2c.b2clogin.com/tfp/{Tenant}/{policy}). The builder to chain the .With methods. Base class for parameter builders common to public client application and confidential client application token acquisition operations Base class for confidential client application token request builders Validates the parameters of the AcquireToken operation. Modifies the token acquisition request so that the acquired token is a Proof-of-Possession token (PoP), rather than a Bearer token. PoP tokens are similar to Bearer tokens, but are bound to the HTTP request and to a cryptographic key, which MSAL can manage on Windows. See https://aka.ms/msal-net-pop Configuration properties used to construct a Proof-of-Possession request. The builder. An Authentication header is automatically added to the request. The PoP token is bound to the HTTP request, more specifically to the HTTP method (GET, POST, etc.) and to the Uri (path and query, but not query parameters). MSAL creates, reads and stores a key in memory that will be cycled every 8 hours. This is an experimental API. The method signature may change in the future without involving a major version upgrade. Abstract base class for managed identity application token request builders. Default constructor for AbstractManagedIdentityParameterBuilder. Base class for public client application token request builders Builder for AcquireTokenByAuthorizationCode Applicable to first-party applications only, this method also allows to specify if the x5c claim should be sent to Azure AD. Sending the x5c enables application developers to achieve easy certificate roll-over in Azure AD: this method will send the certificate chain to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation). For details see https://aka.ms/msal-net-sni true if the x5c should be sent. Otherwise false. The default is false The builder to chain the .With methods Used to secure authorization code grant via Proof of Key for Code Exchange (PKCE). See (https://tools.ietf.org/html/rfc7636) for more details. A dynamically created cryptographically random key used to provide proof of possession for the authorization code. The builder to chain the .With methods To help with resiliency, the AAD backup authentication system operates as an AAD backup. This will provide backup authentication system with a routing hint to help improve performance during authentication. GUID which is unique to the user, parsed from the client_info. GUID format of the tenant ID, parsed from the client_info. The builder to chain the .With methods To help with resiliency, the AAD backup authentication system operates as an AAD backup. This will provide backup authentication system with a routing hint to help improve performance during authentication. Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com The builder to chain the .With methods Requests an auth code for the frontend (SPA using MSAL.js for instance). See https://aka.ms/msal-net/spa-auth-code for details. true if a SPA Authorization Code should be returned, false otherwise. The builder to chain the .With methods Builder for AcquireTokenByIntegratedWindowsAuth Specifies the username. Specifying the username explicitly is normally not needed, but some Windows administrators set policies preventing applications from looking up the signed-in user and in that case the username needs to be passed. Identifier of the user account for which to acquire a token with Integrated Windows Authentication. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com The builder to chain the .With methods. Enables MSAL to read the federation metadata for a WS-Trust exchange from the provided input instead of acquiring it from an endpoint. This is only applicable for managed ADFS accounts. See https://aka.ms/MsalFederationMetadata. Federation metadata in the form of XML. The builder to chain the .With methods Parameter builder for the method. See https://aka.ms/msal-net-migration-adal2-msal2 Applicable to first-party applications only, this method also allows to specify if the x5c claim should be sent to Azure AD. Sending the x5c enables application developers to achieve easy certificate roll-over in Azure AD: this method will send the certificate chain to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation). For details see https://aka.ms/msal-net-sni true if the x5c should be sent. Otherwise false. The default is false The builder to chain the .With methods Parameter builder for the operation. See https://aka.ms/msal-net-up Enables MSAL to read the federation metadata for a WS-Trust exchange from the provided input instead of acquiring it from an endpoint. This is only applicable for managed ADFS accounts. See https://aka.ms/MsalFederationMetadata. Federation metadata in the form of XML. The builder to chain the .With methods Modifies the token acquisition request so that the acquired token is a Proof-of-Possession token (PoP), rather than a Bearer token. PoP tokens are similar to Bearer tokens, but are bound to the HTTP request and to a cryptographic key, which MSAL can manage on Windows. Note that only the host and path parts of the request URI will be bound. See https://aka.ms/msal-net-pop Nonce of the protected resource (RP) which will be published as part of the WWWAuthenticate header associated with a 401 HTTP response or as part of the AuthorityInfo header associated with 200 response. Set it here to make it part of the Signed HTTP Request part of the POP token. The HTTP method ("GET", "POST" etc.) method that will be bound to the token. If set to null, the PoP token will not be bound to the method. Corresponds to the "m" part of the a signed HTTP request. The URI to bind the signed HTTP request to. The builder. An Authentication header is automatically added to the request. The PoP token is bound to the HTTP request, more specifically to the HTTP method (GET, POST, etc.) and to the Uri (path and query, but not query parameters). Broker is required to use Proof-of-Possession on public clients. Builder for AcquireTokenForClient (used in client credential flows, in daemon applications). See https://aka.ms/msal-net-client-credentials Specifies if the token request will ignore the access token in the application token cache and will attempt to acquire a new access token using client credentials. By default the token is taken from the application token cache (forceRefresh=false) If true, the request will ignore the token cache. The default is false The builder to chain the .With methods Applicable to first-party applications only, this method also allows to specify if the x5c claim should be sent to Azure AD. Sending the x5c enables application developers to achieve easy certificate roll-over in Azure AD: this method will send the certificate chain to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation). For details see https://aka.ms/msal-net-sni true if the x5c should be sent. Otherwise false. The default is false The builder to chain the .With methods Please use WithAzureRegion on the ConfidentialClientApplicationBuilder object Please use WithAzureRegion on the ConfidentialClientApplicationBuilder object Builder for AcquireTokenForManagedIdentity (used to get token for managed identities). See https://aka.ms/msal-net-managed-identity Specifies if the token request will ignore the access token in the application token cache and will attempt to acquire a new access token for managed identity. By default the token is taken from the application token cache (forceRefresh=false) If true, the request will ignore the token cache. The default is false The builder to chain the .With methods Builder for an Interactive token request. See https://aka.ms/msal-net-acquire-token-interactively Specifies if the public client application should used an embedded web browser or the system default browser. If the broker (WAM, Authenticator, Company Portal) is configured, this setting is only used when the broker is not installed. On .NET, including net8-windows, app developers must reference Microsoft.Identity.Client.Desktop and call PublicClientApplicationBuilder.WithDesktopFeatures() to enable the embedded web browser. If true, will use an embedded web browser, otherwise will attempt to use a system web browser. The default depends on the platform: false for iOS and Android, and true for .NET Framework The builder to chain the .With methods Specifies options for using the system OS browser handle interactive authentication. Data object with options The builder to chain the .With methods Specifies options for using the embedded web view for interactive authentication. Data object with options The builder to chain the .With methods Sets the , in order to avoid select account dialogs in the case the user is signed-in with several identities. This method is mutually exclusive with . If both are used, an exception will be thrown Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com The builder to chain the .With methods Sets the account for which the token will be retrieved. This method is mutually exclusive with . If both are used, an exception will be thrown Account to use for the interactive token acquisition. See for ways to get an account The builder to chain the .With methods Scopes that you can request the end user to consent upfront, in addition to the scopes for the protected Web API for which you want to acquire a security token. The builder to chain the .With methods Specifies the what the interactive experience is for the user. Requested interactive experience. The default is The builder to chain the .With methods Sets a reference to the ViewController (if using iOS), Activity (if using Android) IWin32Window or IntPtr (if using .Net Framework). Used for invoking the browser. Mandatory only on Android. Can also be set via the PublicClientApplication builder. The parent as an object, so that it can be used from shared NetStandard assemblies The builder to chain the .With methods Sets a reference to the current ViewController that triggers the browser to be shown. The current ViewController The builder to chain the .With methods Modifies the token acquisition request so that the acquired token is a Proof-of-Possession token (PoP), rather than a Bearer token. PoP tokens are similar to Bearer tokens, but are bound to the HTTP request and to a cryptographic key, which MSAL can manage on Windows. Note that only the host and path parts of the request URI will be bound. See https://aka.ms/msal-net-pop Nonce of the protected resource which will be published as part of the WWW-Authenticate header associated with a 401 HTTP response or as part of the AuthorityInfo header associated with 200 response. Set it here to make it part of the Signed HTTP Request part of the PoP token. The HTTP method ("GET", "POST" etc.) method that will be bound to the token. If set to null, the PoP token will not be bound to the method. Corresponds to the "m" part of the a signed HTTP request. The URI to bind the signed HTTP request to. The builder. An Authentication header is automatically added to the request. The PoP token is bound to the HTTP request, more specifically to the HTTP method (GET, POST, etc.) and to the Uri (path and query, but not query parameters). Broker is required to use Proof-of-Possession on public clients. Builder for AcquireTokenOnBehalfOf (OBO flow) See https://aka.ms/msal-net-on-behalf-of Specifies a key by which to look up the token in the cache instead of searching by an assertion. Key by which to look up the token in the cache A builder enabling you to add optional parameters before executing the token request Applicable to first-party applications only, this method also allows to specify if the x5c claim should be sent to Azure AD. Sending the x5c enables application developers to achieve easy certificate roll-over in Azure AD: this method will send the certificate chain to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation). For details see https://aka.ms/msal-net-sni true if the x5c should be sent. Otherwise false. The default is false The builder to chain the .With methods Specifies if the client application should force refreshing the token from the user token cache. By default the token is taken from the the user token cache (forceRefresh=false) If true, ignore any access token in the user token cache and attempt to acquire new access token using the refresh token for the account if one is available. This can be useful in the case when the application developer wants to make sure that conditional access policies are applied immediately, rather than after the expiration of the access token. The default is false The builder to chain the .With methods Avoid unnecessarily setting to true true in order to avoid negatively affecting the performance of your application To help with resiliency, the AAD backup authentication system operates as an AAD backup. This will provide the AAD backup authentication system with a routing hint to help improve performance during authentication. GUID which is unique to the user, parsed from the client_info. GUID format of the tenant ID, parsed from the client_info. The builder to chain the .With methods To help with resiliency, the AAD backup authentication system operates as an AAD backup. This will provide the AAD backup authentication system with a routing hint to help improve performance during authentication. Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com The builder to chain the .With methods Parameter builder for the operation. See https://aka.ms/msal-net-acquiretokensilent Sets the account for which the token will be retrieved. This method is mutually exclusive with . If both are used, an exception will be thrown Account to use for the silent token acquisition. See for ways to get an account The builder to chain the .With methods An exception will be thrown If AAD returns a different account than the one that is being requested for. Specifies if the client application should force refreshing the token from the user token cache. By default the token is taken from the the user token cache (forceRefresh=false) If true, ignore any access token in the user token cache and attempt to acquire new access token using the refresh token for the account if one is available. This can be useful in the case when the application developer wants to make sure that conditional access policies are applied immediately, rather than after the expiration of the access token. The default is false The builder to chain the .With methods Avoid unnecessarily setting to true true in order to avoid negatively affecting the performance of your application Applicable to first-party applications only, this method also allows to specify if the x5c claim should be sent to Azure AD. Sending the x5c enables application developers to achieve easy certificate roll-over in Azure AD: this method will send the certificate chain to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation). For details see https://aka.ms/msal-net-sni true if the x5c should be sent. Otherwise false. The default is false The builder to chain the .With methods Modifies the token acquisition request so that the acquired token is a Proof-of-Possession token (PoP), rather than a Bearer token. PoP tokens are similar to Bearer tokens, but are bound to the HTTP request and to a cryptographic key, which MSAL can manage on Windows. See https://aka.ms/msal-net-pop Configuration properties used to construct a Proof-of-Possession request. An Authentication header is automatically added to the request. The PoP token is bound to the HTTP request, more specifically to the HTTP method (GET, POST, etc.) and to the Uri (path and query, but not query parameters). MSAL creates, reads and stores a key in memory that will be cycled every 8 hours. This is an experimental API. The method signature may change in the future without involving a major version upgrade. Modifies the token acquisition request so that the acquired token is a Proof-of-Possession token (PoP), rather than a Bearer token. PoP tokens are similar to Bearer tokens, but are bound to the HTTP request and to a cryptographic key, which MSAL can manage on Windows. Note that only the host and path parts of the request URI will be bound. See https://aka.ms/msal-net-pop Nonce of the protected resource (RP) which will be published as part of the WWWAuthenticate header associated with a 401 HTTP response or as part of the AuthorityInfo header associated with 200 response. Set it here to make it part of the Signed HTTP Request part of the POP token. The HTTP method ("GET", "POST" etc.) method that will be bound to the token. If set to null, the PoP token will not be bound to the method. Corresponds to the "m" part of the a signed HTTP request. The URI to bind the signed HTTP request to. The builder. An Authentication header is automatically added to the request. The PoP token is bound to the HTTP request, more specifically to the HTTP method (GET, POST, etc.) and to the Uri (path and query, but not query parameters). MSAL creates, reads and stores a key in memory that will be cycled every 8 hours. On confidential clients, this is an experimental API. The method signature may change in the future without involving a major version upgrade. Broker is required to use Proof-of-Possession on public clients. Parameters builder for the operation. See https://aka.ms/msal-net-device-code-flow Sets the Callback delegate so your application can interact with the user to direct them to authenticate (to a specific URL, with a code) callback containing information to show the user about how to authenticate and enter the device code. The builder to chain the .With methods Base class for builders of token requests, which attempt to acquire a token based on the provided parameters. Default constructor for AbstractAcquireTokenParameterBuilder. Executes the Token request asynchronously, with a possibility of cancelling the asynchronous method. Cancellation token. See Authentication result containing a token for the requested scopes and parameters set in the builder. Cancellation is not guaranteed, it is best effort. If the operation reaches a point of no return, e.g. tokens are acquired and written to the cache, the task will complete even if cancellation was requested. Do not rely on cancellation tokens for strong consistency. To learn more about potential exceptions thrown by the function, refer to Exceptions in MSAL.NET. Executes the Token request asynchronously. Authentication result containing a token for the requested scopes and parameters set in the builder. Sets the correlation id to be used in the authentication request. Used to track a request in the logs of both the SDK and the Identity Provider service. If not set, a random one will be generated. Correlation id of the authentication request. The builder to chain the .With methods. Validates the parameters of the AcquireToken operation. The class specifies the options for broker across OperatingSystems The common properties are direct members Platform specific properties (if they exist) are part of the corresponding options Supported OperatingSystems No OS specified - Invalid options Use broker on Windows OS Constructor Choices of OperatingSystems Creates BrokerOptions from WindowsBrokerOptions Operating systems on which broker is enabled. Title of the broker window A legacy option available only to Microsoft First-Party applications. Should be avoided where possible. This is a convenience API, the same can be achieved by using WithExtraQueryParameters and passing the extra query parameter "msal_request_type": "consumer_passthrough" Currently only supported on Windows Allows the Windows broker to list Work and School accounts as part of the Options for using the embedded webview. Forces a static title to be set on the window hosting the browser. If not configured, the widow's title is set to the web page title. Currently only affects the windows desktop apps (WebView1 / Vulcan and WebView2 browser). It is possible for applications to bundle a fixed version of the runtime, and ship it side-by-side. For this you need to tell MSAL (so it can tell WebView2) where to find the runtime bits by setting this property. If you don't set it, MSAL will attempt to use a system-wide "evergreen" installation of the runtime." For more details see CoreWebView2Environment.CreateAsync Method. Abstract class for confidential clients Supports common property(ies) Parameter sent to request to send X5C or not. This overrides application config settings. if true then Spa code param will be sent via AcquireTokenByAuthorizeCode These need to be asked for to the /authorize endpoint (for consent) but not to the /token endpoint User assertion is null when is called. User-provided cache key for long-running OBO flow. Only affects . When enabled, mimics MSAL 4.50.0 and below behavior - checks in cache for cached tokens first, and if not found, then uses user assertion to request new tokens from AAD. When disabled (default behavior), doesn't search in cache, but uses the user assertion to retrieve tokens from AAD. NOTE: a few of the methods in AbstractAcquireTokenParameterBuilder (e.g. account) don't make sense here. Do we want to create a further base that contains ALL of the common methods, and then have another one including account, etc that are only used for AcquireToken? Sets the redirect URI to add to the Authorization request URL Address to return to upon receiving a response from the authority. Used to secure authorization code grant via Proof of Key for Code Exchange (PKCE). For more information, see the PKCE RCF: https://tools.ietf.org/html/rfc7636 MSAL.NET will generate it. To help with resiliency, the AAD backup authentication system operates as an AAD backup. This will provide the AAD backup authentication system with a routing hint to help improve performance during authentication. The hint created with this api will take precedence over the one created with GUID which is unique to the user, parsed from the client_info. GUID format of the tenant ID, parsed from the client_info. The builder to chain the .With methods Specifies the interactive experience for the user. Requested interactive experience. The default is The builder to chain the .With methods Options for using the default OS browser as a separate process to handle interactive auth. MSAL will be listening for the OS browser to finish authenticating, but it cannot close the browser. It can however respond with a 200 OK message or a 302 Redirect, which can be configured here. For more details see https://aka.ms/msal-net-os-browser Constructor When the user finishes authenticating, MSAL will respond with a 200 OK message, which the browser will show to the user. When the user finishes authenticating, but an error occurred, MSAL will respond with a 200 OK message, which the browser will show to the user. You can use a string format e.g. "An error has occurred: {0} details: {1}" When the user finishes authenticating, MSAL will redirect the browser to the given Uri Takes precedence over When the user finishes authenticating, but an error occurred, MSAL will redirect the browser to the given Uri Takes precedence over This hides the privacy prompt displayed on iOS Devices (ver 13.0+) when set to true. By default, it is false and displays the prompt. Allows developers to implement their own logic for starting a browser and navigating to a specific Uri. MSAL will use this when opening the browser. Leave it null and the user configured browser will be used. Consider using the static helpers OpenWithEdgeBrowserAsync and OpenWithChromeEdgeBrowserAsync Use Microsoft Edge to navigate to the given URI. On non-windows platforms it uses whatever browser is the default. Use Microsoft Edge Chromium to navigate to the given URI. Requires the browser to be installed. On Linux, uses the default system browser instead, as Edge is not available. Advanced options for using the Windows 10 broker. For more details see https://aka.ms/msal-net-wam A legacy option available only to Microsoft applications. Should be avoided where possible. Support is experimental. Allow the Windows broker to list Work and School accounts as part of the Display a custom text in the broker UI controls which support it. Currently only the WAM account picker allows for this customization, see WAM documentation. Specifies which Microsoft accounts can be used for sign-in with a given application. See https://aka.ms/msal-net-application-configuration The sign-in audience was not specified Users with a Microsoft work or school account in my organization’s Azure AD tenant (i.e. single tenant). Maps to https://[instance]/[tenantId] Users with a personal Microsoft account, or a work or school account in any organization’s Azure AD tenant Maps to https://[instance]/common/ Users with a Microsoft work or school account in any organization’s Azure AD tenant (i.e. multi-tenant). Maps to https://[instance]/organizations/ Users with a personal Microsoft account. Maps to https://[instance]/consumers/ Allows developers to configure their own valid authorities. A json string similar to https://aka.ms/aad-instance-discovery should be provided. MSAL uses this information to: Call REST APIs on the environment specified in the preferred_network Identify an environment under which to save tokens and accounts in the cache Use the environment aliases to match tokens issued to other authorities For more details see https://aka.ms/msal-net-custom-instance-metadata Developers take responsibility for authority validation if they use this method. Should not be used when the authority is not know in advance. Has no effect on ADFS or B2C authorities, only for AAD authorities Allows developers to configure their own valid authorities. A json string similar to https://aka.ms/aad-instance-discovery should be provided. MSAL uses this information to: Call REST APIs on the environment specified in the preferred_network Identify an environment under which to save tokens and accounts in the cache Use the environment aliases to match tokens issued to other authorities For more details see https://aka.ms/msal-net-custom-instance-metadata Developers take responsibility for authority validation if they use this method. Should not be used when the authority is not known in advance. Has no effect on ADFS or B2C authorities, only for AAD authorities Lets an organization setup their own service to handle instance discovery, which enables better caching for microservice/service environments. A Uri that returns a response similar to https://aka.ms/aad-instance-discovery should be provided. MSAL uses this information to: Call REST APIs on the environment specified in the preferred_network Identify an environment under which to save tokens and accounts in the cache Use the environment aliases to match tokens issued to other authorities For more details see https://aka.ms/msal-net-custom-instance-metadata Developers take responsibility for authority validation if they use this method. Should not be used when the authority is not know in advance. Has no effect on ADFS or B2C authorities, only for AAD authorities Lets an organization setup their own service to handle instance discovery, which enables better caching for microservice/service environments. A Uri that returns a response similar to https://aka.ms/aad-instance-discovery should be provided. MSAL uses this information to: Call REST APIs on the environment specified in the preferred_network Identify an environment under which to save tokens and accounts in the cache Use the environment aliases to match tokens issued to other authorities For more details see https://aka.ms/msal-net-custom-instance-metadata Developers take responsibility for authority validation if they use this method. Should not be used when the authority is not known in advance. Has no effect on ADFS or B2C authorities, only for AAD authorities Options for MSAL token caches. MSAL maintains a token cache internally in memory. By default, this cache object is part of each instance of or . This method allows customization of the in-memory token cache of MSAL. MSAL's memory cache is different than token cache serialization. Cache serialization pulls the tokens from a cache (e.g. Redis, Cosmos, or a file on disk), where they are stored in JSON format, into MSAL's internal memory cache. Memory cache operations do not involve JSON operations. External cache serialization remains the recommended way to handle desktop apps, web site and web APIs, as it provides persistence. These options do not currently control external cache serialization. Detailed guidance for each application type and platform: https://aka.ms/msal-net-token-cache-serialization Options for the internal MSAL token caches. Enables legacy ADAL cache serialization and deserialization. Enable legacy ADAL cache compatibility. The builder to chain the .With methods. ADAL is a previous legacy generation of MSAL.NET authentication library. If you don't use .WithLegacyCacheCompatibility(false), then by default, the ADAL cache is used (along with MSAL cache). true flag is only needed for specific migration scenarios from ADAL.NET to MSAL.NET when both library versions are running side-by-side. To improve performance add .WithLegacyCacheCompatibility(false) unless you care about migration scenarios. Sets the telemetry callback. For details see https://aka.ms/msal-net-telemetry Delegate to the callback sending the telemetry elaborated by the library to the telemetry endpoint of choice The builder to chain the .With methods is thrown if the method was already called on the application builder. Sets the Client ID of the application Client ID (also known as Application ID) of the application as registered in the application registration portal (https://aka.ms/msal-net-register-app) The builder to chain the .With methods Sets the redirect URI of the application. The URI must also be registered in the application portal. See https://aka.ms/msal-net-application-configuration URL where the STS will call back the application with the security token. Public Client Applications - desktop, mobile, console apps - use different browsers (system browser, embedded browses) and brokers and each has its own rules. The builder to chain the .With methods Sets the tenant ID of the organization from which the application will let users sign-in. This is classically a GUID or a domain name. See https://aka.ms/msal-net-application-configuration. Although it is also possible to set to common, organizations, and consumers, it's recommended to use one of the overrides of . tenant ID of the Azure AD tenant or a domain associated with this Azure AD tenant, in order to sign-in a user of a specific organization only The builder to chain the .With methods Sets the name of the calling application for telemetry purposes. The name of the application for telemetry purposes. Sets the version of the calling application for telemetry purposes. The version of the calling application for telemetry purposes. Sets application options, which can, for instance have been read from configuration files. See https://aka.ms/msal-net-application-configuration. Application options The builder to chain the .With methods Sets Extra Query Parameters for the query string in the HTTP authentication request This parameter will be appended as is to the query string in the HTTP authentication request to the authority as a string of segments of the form key=value separated by an ampersand character. The parameter can be null. The builder to chain the .With methods Sets Extra Query Parameters for the query string in the HTTP authentication request This parameter will be appended as is to the query string in the HTTP authentication request to the authority. The string needs to be properly URL-encoded and ready to send as a string of segments of the form key=value separated by an ampersand character. Microsoft Identity specific OIDC extension that allows resource challenges to be resolved without interaction. Allows configuration of one or more client capabilities, e.g. "llt" MSAL will transform these into special claims request. See https://openid.net/specs/openid-connect-core-1_0-final.html#ClaimsParameter for details on claim requests. For more details see https://aka.ms/msal-net-claims-request Determines whether or not instance discovery is performed when attempting to authenticate. Setting this to false will completely disable instance discovery and authority validation. This will not affect the behavior of application configured with regional endpoints however. If instance discovery is disabled and no user metadata is provided, MSAL will use the provided authority without any checks. takes priority over so instance metadata can be provided regardless of this configuration. Determines if instance discovery/Authority validation is performed Generate telemetry aggregation events. Adds a known authority to the application. See Application configuration options. This constructor is mainly used for scenarios where the authority is not a standard Azure AD authority, nor an ADFS authority, nor an Azure AD B2C authority. For Azure AD, even in sovereign clouds, prefer using other overrides such as URI of the authority Whether the authority should be validated against the server metadata. Thrown if is null. Thrown if is not well-formatted (for example, has spaces). Thrown in general exception scenarios (for example if the application was configured with multiple different authority hosts). The builder to chain the .With methods Adds a known Azure AD authority to the application to sign-in users specifying the full authority URI. See Application configuration options. URI of the authority from which MSAL.NET will acquire the tokens. Authority endpoints for the Azure public Cloud are: https://login.microsoftonline.com/tenant/ where tenant is the tenant ID of the Azure AD tenant or a domain associated with this Azure AD tenant, in order to sign-in users of a specific organization only https://login.microsoftonline.com/common/ to sign-in users with any work and school accounts or personal Microsoft accounts https://login.microsoftonline.com/organizations/ to sign-in users with any work and school accounts https://login.microsoftonline.com/consumers/ to sign-in users with only personal Microsoft accounts (live) Note that this setting needs to be consistent with what is declared in the application registration portal Whether the authority should be validated against the server metadata. Thrown if is null or empty. Thrown if is not well-formatted (for example, has spaces). Thrown in general exception scenarios (for example if the application was configured with multiple different authority hosts). The builder to chain the .With methods Adds a known Azure AD authority to the application to sign-in users from a single organization (single-tenant application) specified by its tenant ID. See Application configuration options. Azure cloud instance. GUID of the tenant from which to sign-in users. Whether the authority should be validated against the server metadata. Thrown if is null or empty. Thrown if is not well-formatted (for example, has spaces). Thrown in more general exception scenarios (for example if the application was configured with multiple different authority hosts). The builder to chain the .With methods. Adds a known Azure AD authority to the application to sign-in users from a single organization (single-tenant application) described by its domain name. See https://aka.ms/msal-net-application-configuration. Uri to the Azure cloud instance (for instance https://login.microsoftonline.com) Domain name associated with the tenant from which to sign-in users Whether the authority should be validated against the server metadata. can also contain the string representation of a GUID (tenantId), or even common, organizations or consumers but in this case it's recommended to use another override ( and Thrown if or is null or empty. Thrown if or is not well-formatted (for example, has spaces). Thrown in more general exception scenarios (for example if the application was configured with multiple different authority hosts). The builder to chain the .With methods Adds a known Azure AD authority to the application to sign-in users from a single organization (single tenant application) described by its cloud instance and its tenant ID. See https://aka.ms/msal-net-application-configuration. Instance of Azure cloud (for example, Azure public cloud, Azure China, or Azure Government). Tenant Id of the tenant from which to sign-in users Whether the authority should be validated against the server metadata. The builder to chain the .With methods Adds a known Azure AD authority to the application to sign-in users from a single organization (single-tenant application) described by its cloud instance and its domain name or tenant ID. See https://aka.ms/msal-net-application-configuration. Instance of Azure cloud (for example, Azure public cloud, Azure China, or Azure Government). Domain name associated with the Azure AD tenant from which to sign-in users. This can also be a GUID. Whether the authority should be validated against the server metadata. Thrown if or is null or empty. The builder to chain the .With methods. Adds a known Azure AD authority to the application to sign-in users specifying the cloud instance and the sign-in audience. See https://aka.ms/msal-net-application-configuration. Instance of Azure Cloud (for instance Azure worldwide cloud, Azure German Cloud, US government ...) Sign-in audience (one AAD organization, any work and school accounts, or any work and school accounts and Microsoft personal accounts Whether the authority should be validated against the server metadata. The builder to chain the .With methods Adds a known Azure AD authority to the application to sign-in users specifying the sign-in audience (the cloud being the Azure public cloud). See https://aka.ms/msal-net-application-configuration. Sign-in audience (one AAD organization, any work and school accounts, or any work and school accounts and Microsoft personal accounts Whether the authority should be validated against the server metadata. The builder to chain the .With methods Adds a known Authority corresponding to an ADFS server. See https://aka.ms/msal-net-adfs Authority URL for an ADFS server Whether the authority should be validated against the server metadata. MSAL.NET will only support ADFS 2019 or later. The builder to chain the .With methods Adds a known authority corresponding to an Azure AD B2C policy. See https://aka.ms/msal-net-b2c-specificities Azure AD B2C authority, including the B2C policy (for instance "https://fabrikamb2c.b2clogin.com/tfp/{Tenant}/{policy}) The builder to chain the .With methods Applicable to only public client applications to enforce SSO policy with embedded webview. Service principal name for Kerberos Service Ticket. Kerberos Service Ticket container to be used. This is here just to support the public IAppConfig. Should not be used internally, instead use the abstraction. This is here just to support the public IAppConfig. Should not be used internally, instead use the abstraction. Should _not_ go in the interface, only for builder usage while determining authorities with ApplicationOptions Should _not_ go in the interface, only for builder usage while determining authorities with ApplicationOptions Should _not_ go in the interface, only for builder usage while determining authorities with ApplicationOptions Should _not_ go in the interface, only for builder usage while determining authorities with ApplicationOptions Base class for options objects with string values loadable from a configuration file (for instance a JSON file, as in an asp.net configuration scenario) See https://aka.ms/msal-net-application-configuration See also derived classes and Client ID (also known as App ID) of the application as registered in the application registration portal (https://aka.ms/msal-net-register-app) Tenant from which the application will allow users to sign it. This can be: a domain associated with a tenant, a GUID (tenant id), or a meta-tenant (e.g. consumers). This property is mutually exclusive with . If both are provided, an exception will be thrown. The name of the property was chosen to ensure compatibility with AzureAdOptions in ASP.NET Core configuration files (even the semantics would be tenant) Sign-in audience. This property is mutually exclusive with TenantId. If both are provided, an exception will be thrown. STS instance (for instance https://login.microsoftonline.com for the Azure public cloud). The name was chosen to ensure compatibility with AzureAdOptions in ASP.NET Core. This property is mutually exclusive with . If both are provided, an exception will be thrown. Specific instance in the case of Azure Active Directory. It allows users to use the enum instead of the explicit URL. This property is mutually exclusive with . If both are provided, an exception will be thrown. This redirect URI needs to be registered in the app registration. See https://aka.ms/msal-net-register-app for details on which redirect URIs are defined by default by MSAL.NET and how to register them. Also use: which provides a good default for public client applications for all platforms. For web apps and web APIs, the redirect URI is computed from the URL where the application is running (for instance, baseUrl//signin-oidc for ASP.NET Core web apps). For daemon applications (confidential client applications using only the Client Credential flow that is calling AcquireTokenForClient), no reply URI is needed. This is especially important when you deploy an application that you have initially tested locally; you then need to add the reply URL of the deployed application in the application registration portal The name of the calling application for telemetry purposes. The version of the calling application for telemetry purposes. Microsoft Identity specific OIDC extension that allows resource challenges to be resolved without interaction. Allows configuration of one or more client capabilities, e.g. "llt" MSAL will transform these into special claims request. See https://openid.net/specs/openid-connect-core-1_0-final.html#ClaimsParameter for details on claim requests. For more details see https://aka.ms/msal-net-claims-request Enables legacy ADAL cache serialization and deserialization. Service principal name for Kerberos Service Ticket. Kerberos Service Ticket container to be used. Information about the client assertion that need to be generated See https://aka.ms/msal-net-client-assertion Use the provided information to generate the client assertion payload Client ID for which a signed assertion is requested The intended token endpoint This class must be kept immutable For IWA Authority supports multi-tenancy. ADFS and Generic authorities are not tenanted. B2C doesn't allow multi-tenancy scenarios, but the authority itself is tenanted. For CIAM, we allow multi-tenancy scenarios, and expect the STS to fail. True if SHA2 and PSS can be used for creating the client credential from a certificate Validates the authority string and creates a Uri object out of it. Authority must not be null or whitespace, must be a well-formed URI (e.g. not include spaces), and must have an HTTPS schema. Non-generic authorities must have at least one segment in the path. This is extension for AuthorityInfo Figures out the authority based on the authority from the config and the authority from the request, and optionally the homeAccountTenantId, which has an impact on AcquireTokenSilent If the request authority is consumers, organizations, or common, it should just be set an the app level. The algorithm is: 1. If there is no request authority (i.e. no authority override), use the config authority. 1.1. For AAD, if the config authority is "common" etc, try to use the tenanted version with the home account tenant ID 2. If there is a request authority, try to use it. 2.1. If the request authority is not "common", then use it 2.2 If the request authority is "common", ignore it, and use 1.1 Special cases: - if the authority is not defined at the application level and the request level is not AAD, use the request authority - if the authority is defined at app level, and the request level authority is of different type, throw an exception - if the intended authority is consumers, please define it at the app level and not at the request level. known issue: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/2929 Enumeration for the AuthorityTypes Value communicating that the AzureCloudInstance is not specified. Microsoft Azure public cloud. Maps to https://login.microsoftonline.com Microsoft Azure China cloud. Maps to https://login.chinacloudapi.cn Microsoft Azure German cloud ("Black Forest"). Maps to https://login.microsoftonline.de US Government cloud. Maps to https://login.microsoftonline.us Uses a specific to communicate with the IdP. This enables advanced scenarios such as setting a proxy, or setting the Agent. HTTP client factory MSAL does not guarantee that it will not modify the HttpClient, for example by adding new headers. Prior to the changes needed in order to make MSAL's httpClients thread safe (https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/pull/2046/files), the httpClient had the possibility of throwing an exception stating "Properties can only be modified before sending the first request". MSAL's httpClient will no longer throw this exception after 4.19.0 (https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/releases/tag/4.19.0) see (https://aka.ms/msal-httpclient-info) for more information. The builder to chain the .With methods Uses a specific to communicate with the IdP. This enables advanced scenarios such as setting a proxy, or setting the Agent. HTTP client factory Configures MSAL to retry on 5xx server errors. When enabled (on by default), MSAL will wait 1 second after receiving a 5xx error and then retry the http request again. MSAL does not guarantee that it will not modify the HttpClient, for example by adding new headers. Prior to the changes needed in order to make MSAL's httpClients thread safe (https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/pull/2046/files), the httpClient had the possibility of throwing an exception stating "Properties can only be modified before sending the first request". MSAL's httpClient will no longer throw this exception after 4.19.0 (https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/releases/tag/4.19.0) see (https://aka.ms/msal-httpclient-info) for more information. If you only want to configure the retryOnceOn5xx parameter, set httpClientFactory to null and MSAL will use the default http client. The builder to chain the .With methods Sets the logging callback. For details see https://aka.ms/msal-net-logging Desired level of logging. The default is LogLevel.Info Boolean used to enable/disable logging of Personally Identifiable Information (PII). PII logs are never written to default outputs like Console, Logcat or NSLog Default is set to false, which ensures that your application is compliant with GDPR. You can set it to true for advanced debugging requiring PII If both WithLogging apis are set, the other one will override the this one Flag to enable/disable logging to platform defaults. In Desktop, Event Tracing is used. In iOS, NSLog is used. In android, Logcat is used. The default value is false The builder to chain the .With methods is thrown if the loggingCallback was already set on the application builder Sets the Identity Logger. For details see https://aka.ms/msal-net-logging IdentityLogger Boolean used to enable/disable logging of Personally Identifiable Information (PII). PII logs are never written to default outputs like Console, Logcat or NSLog Default is set to false, which ensures that your application is compliant with GDPR. You can set it to true for advanced debugging requiring PII If both WithLogging apis are set, this one will override the other The builder to chain the .With methods Sets the Debug logging callback to a default debug method which displays the level of the message and the message itself. For details see https://aka.ms/msal-net-logging Desired level of logging. The default is LogLevel.Info Boolean used to enable/disable logging of Personally Identifiable Information (PII). PII logs are never written to default outputs like Console, Logcat or NSLog Default is set to false, which ensures that your application is compliant with GDPR. You can set it to true for advanced debugging requiring PII Flag to enable/disable logging to platform defaults. In Desktop, Event Tracing is used. In iOS, NSLog is used. In android, logcat is used. The default value is false The builder to chain the .With methods is thrown if the loggingCallback was already set on the application builder by calling Sets application options, which can, for instance have been read from configuration files. See https://aka.ms/msal-net-application-configuration. Application options The builder to chain the .With methods Allows usage of experimental features and APIs. If this flag is not set, experimental features will throw an exception. For details see https://aka.ms/msal-net-experimental-features Changes in the public API of experimental features will not result in an increment of the major version of this library. For these reason we advise against using these features in production. Base class for options objects with string values loadable from a configuration file (for instance a JSON file, as in an asp.net configuration scenario) See https://aka.ms/msal-net-application-configuration See also derived classes Enables you to configure the level of logging you want. The default value is . Setting it to will only get errors Setting it to will get errors and warning, etc.. See https://aka.ms/msal-net-logging Flag to enable/disable logging of Personally Identifiable Information (PII). PII logs are never written to default outputs like Console, Logcat or NSLog Default is set to false, which ensures that your application is compliant with GDPR. You can set it to true for advanced debugging requiring PII. See https://aka.ms/msal-net-logging Flag to enable/disable logging to platform defaults. In Desktop, Event Tracing is used. In iOS, NSLog is used. In Android, logcat is used. The default value is false. See https://aka.ms/msal-net-logging Options for MSAL token caches. Detailed cache guidance for each application type and platform, including L2 options: https://aka.ms/msal-net-token-cache-serialization Recommended options for using a static cache. Constructor for the options with default values. Constructor Set to true to share the cache between all ClientApplication objects. The cache becomes static. for a detailed description. Share the cache between all ClientApplication objects. The cache becomes static. Defaults to false. Recommended only for client credentials flow (service to service communication). Web apps and Web APIs should use external token caching (Redis, Cosmos etc.) for scaling purposes. Desktop apps should encrypt and persist their token cache to disk, to avoid losing tokens when app restarts. ADAL used a static cache by default. Constructor of a ConfidentialClientApplicationBuilder from application configuration options. See https://aka.ms/msal-net-application-configuration Confidential client applications configuration options A from which to set more parameters, and to create a confidential client application instance Creates a ConfidentialClientApplicationBuilder from a clientID. See https://aka.ms/msal-net-application-configuration Client ID (also known as App ID) of the application as registered in the application registration portal (https://aka.ms/msal-net-register-app)/. A from which to set more parameters, and to create a confidential client application instance Sets the certificate associated with the application. The X509 certificate used as credentials to prove the identity of the application to Azure AD. You should use certificates with a private key size of at least 2048 bytes. Future versions of this library might reject certificates with smaller keys. Does not send the certificate (as x5c parameter) with the request by default. Sets the certificate associated with the application. Applicable to first-party applications only, this method also allows to specify if the x5c claim should be sent to Azure AD. Sending the x5c enables application developers to achieve easy certificate roll-over in Azure AD: this method will send the certificate chain to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation). For details see https://aka.ms/msal-net-sni The X509 certificate used as credentials to prove the identity of the application to Azure AD. To send X5C with every request or not. The default is false You should use certificates with a private key size of at least 2048 bytes. Future versions of this library might reject certificates with smaller keys. Sets the certificate associated with the application along with the specific claims to sign. By default, this will merge the with the default required set of claims needed for authentication. If is set to false, you will need to provide the required default claims. See https://aka.ms/msal-net-client-assertion The X509 certificate used as credentials to prove the identity of the application to Azure AD. The claims to be signed by the provided certificate. Determines whether or not to merge with the default claims required for authentication. You should use certificates with a private key size of at least 2048 bytes. Future versions of this library might reject certificates with smaller keys. Does not send the certificate (as x5c parameter) with the request by default. Sets the certificate associated with the application along with the specific claims to sign. By default, this will merge the with the default required set of claims needed for authentication. If is set to false, you will need to provide the required default claims. See https://aka.ms/msal-net-client-assertion The X509 certificate used as credentials to prove the identity of the application to Azure AD. The claims to be signed by the provided certificate. Determines whether or not to merge with the default claims required for authentication. To send X5C with every request or not. You should use certificates with a private key size of at least 2048 bytes. Future versions of this library might reject certificates with smaller keys. Sets the application secret Secret string previously shared with AAD at application registration to prove the identity of the application (the client) requesting the tokens Sets the application client assertion. See https://aka.ms/msal-net-client-assertion. This will create an assertion that will be held within the client application's memory for the duration of the client. You can use to set a delegate that will be executed for each authentication request. This will allow you to update the client assertion used by the client application once the assertion expires. The client assertion used to prove the identity of the application to Azure AD. This is a Base-64 encoded JWT. Configures a delegate that creates a client assertion. See https://aka.ms/msal-net-client-assertion delegate computing the client assertion used to prove the identity of the application to Azure AD. This is a delegate that computes a Base-64 encoded JWT for each authentication call. The ConfidentialClientApplicationBuilder to chain more .With methods Callers can use this mechanism to cache their assertions Configures an async delegate that creates a client assertion. See https://aka.ms/msal-net-client-assertion An async delegate computing the client assertion used to prove the identity of the application to Azure AD. This is a delegate that computes a Base-64 encoded JWT for each authentication call. The ConfidentialClientApplicationBuilder to chain more .With methods Callers can use this mechanism to cache their assertions Configures an async delegate that creates a client assertion. The delegate is invoked only when a token cannot be retrieved from the cache. See https://aka.ms/msal-net-client-assertion An async delegate that returns the client assertion. Assertion lifetime is the responsibility of the caller. The ConfidentialClientApplicationBuilder to chain more .With methods Callers can use this mechanism to cache their assertions Instructs MSAL to use an Azure regional token service. This feature is currently available to first-party applications only. Either the string with the region (preferred) or use and MSAL will attempt to auto-detect the region. The region value should be a short region name for the region where the service is deployed. For example, "centralus" is short name for region Central US. Currently only tokens for the client credential flow can be obtained from the regional service. Requires configuration at the tenant level. Auto-detection works on a limited number of Azure artifacts (VMs, Azure functions). If auto-detection fails, the non-regional endpoint will be used. If a specific region was provided and the token web request failed, verify that the region name is valid. See https://aka.ms/msal-net-region-discovery for more details. The builder to chain the .With methods When set to true, MSAL will lock cache access at the level, i.e. the block of code between BeforeAccessAsync and AfterAccessAsync callbacks will be synchronized. Apps can set this flag to false to enable an optimistic cache locking strategy, which may result in better performance at the cost of cache consistency. Setting this flag to false is only recommended for apps which create a new per request. This flag is true by default. The default behavior is recommended. Call instead. Adds a known authority corresponding to a generic OpenIdConnect Identity Provider. MSAL will append ".well-known/openid-configuration" to the authority and retrieve the OIDC metadata from there, to figure out the endpoints. See https://openid.net/specs/openid-connect-core-1_0.html#Terminology Do not use this method with Entra ID authorities (e.g. https://login.microsfoftonline.com/common). Use WithAuthority(string) instead. Sets telemetry client for the application. List of telemetry clients to add telemetry logs. The builder to chain the .With methods Builds an instance of from the parameters set in the . Thrown when errors occur locally in the library itself (for example, because of incorrect configuration). An instance of Configuration options for a confidential client application (web app / web API / daemon app). See https://aka.ms/msal-net/application-configuration Client secret for the confidential client application. This secret (application password) is provided by the application registration portal, or provided to Azure AD during the application registration with PowerShell AzureAD, PowerShell AzureRM, or Azure CLI. Instructs MSAL.NET to use an Azure regional token service. This setting should be set to either the string with the region (preferred) or to "TryAutoDetect" and MSAL.NET will attempt to auto-detect the region. Region names as per Region class documentation. Not all auth flows can use the regional token service. Service To Service (client credential flow) tokens can be obtained from the regional service. Requires configuration at the tenant level. Auto-detection works on a limited number of Azure artifacts (VMs, Azure functions). If auto-detection fails, the non-regional endpoint will be used. If an invalid region name is provided, the non-regional endpoint MIGHT be used or the token request MIGHT fail. See https://aka.ms/msal-net-region-discovery for more details. When set to true, MSAL will lock cache access at the level, i.e. the block of code between BeforeAccessAsync and AfterAccessAsync callbacks will be synchronized. Apps can set this flag to false to enable an optimistic cache locking strategy, which may result in better performance at the cost of cache consistency. Setting this flag to false is only recommended for apps which create a new per request. This flag is true by default. The default behavior is recommended. Configuration properties used to build a public or confidential client application. Client ID (also known as App ID) of the application as registered in the application registration portal (https://aka.ms/msal-net-register-app). Flag telling if logging of Personally Identifiable Information (PII) is enabled/disabled for the application. See https://aka.ms/msal-net-logging. used to get HttpClient instances to communicate with the identity provider. Level of logging requested for the app. See https://aka.ms/msal-net-logging. Flag telling if logging to platform defaults is enabled/disabled for the app. In Desktop, Event Tracing is used. In iOS, NSLog is used. In Android, logcat is used. See https://aka.ms/msal-net-logging. Redirect URI for the application. See Audience for the application. See Callback used for logging. It was set with See https://aka.ms/msal-net-logging Extra query parameters that will be applied to every acquire token operation. See Indicates whether or not the current application object is configured to use brokered authentication. The name of the calling application for telemetry purposes. The version of the calling application for telemetry purposes. Allows usage of features that are experimental and would otherwise throw a specific exception. Use of experimental features in production is not recommended and are subject to be removed between builds. For details see https://aka.ms/msal-net-experimental-features. Microsoft Identity specific OIDC extension that allows resource challenges to be resolved without interaction. Allows configuration of one or more client capabilities, e.g. "llt" MSAL will transform these into a "access_token" claims request. See https://openid.net/specs/openid-connect-core-1_0-final.html#ClaimsParameter for details on claim requests. For more details see https://aka.ms/msal-net-claims-request Enables legacy ADAL cache serialization and deserialization. Factory responsible for creating HttpClient. See https://learn.microsoft.com/dotnet/api/system.net.http.httpclient?view=net-7.0#instancing for more details. Implementations must be thread safe. Do not create a new HttpClient for each call to - this leads to socket exhaustion. If your app uses Integrated Windows Authentication, ensure is set to true. Method returning an HTTP client that will be used to communicate with Azure AD. This enables advanced scenarios. See https://aka.ms/msal-net-application-configuration. An HTTP client. Describes the types of audiences for telemetry. This API is experimental and it may change in future versions of the library without an major version increment Indicates a PreProduction environment. PreProd environments are not sampled. Indicates a Production environment. These environments are sampled based on the platforms' device info to reduce data load. This API is experimental and it may change in future versions of the library without an major version increment Communicates which audience the telemetry is for (e.g. Production or Pre-Production) so that MSAL.NET can change sampling and filtering behavior. This API is experimental and it may change in future versions of the library without an major version increment ID for the telemetry session. This API is experimental and it may change in future versions of the library without an major version increment Implementers of the interface will receive this callback when telemetry data is available. The implementation should transfer the data in ITelemetryEventPayload to a specific telemetry uploader instance. This API is experimental and it may change in future versions of the library without an major version increment Data that represents a single snapshot in the series of events that are collected This API is experimental and it may change in future versions of the library without an major version increment This API is experimental and it may change in future versions of the library without an major version increment This API is experimental and it may change in future versions of the library without an major version increment This API is experimental and it may change in future versions of the library without an major version increment This API is experimental and it may change in future versions of the library without an major version increment This API is experimental and it may change in future versions of the library without an major version increment Used for debugging and testing. This API is experimental and it may change in future versions of the library without an major version increment Builder for managed identity applications. Creates a ManagedIdentityApplicationBuilder from a user assigned managed identity clientID / resourceId / objectId. For example, for a system assigned managed identity use ManagedIdentityApplicationBuilder.Create(ManagedIdentityId.SystemAssigned) and for a user assigned managed identity use ManagedIdentityApplicationBuilder.Create(ManagedIdentityId.WithUserAssignedClientId(clientId)) or ManagedIdentityId.WithUserAssignedResourceId("resourceId") or ManagedIdentityId.WithUserAssignedObjectId("objectid"). For more details see https://aka.ms/msal-net-managed-identity Configuration of the Managed Identity assigned to the resource. A from which to set more parameters, and to create a managed identity application instance Sets telemetry client for the application. List of telemetry clients to add telemetry logs. The builder to chain the .With methods Builds an instance of from the parameters set in the . Thrown when errors occur locally in the library itself (for example, because of incorrect configuration). An instance of Class to store configuration for a managed identity enabled on a resource. For a system assigned managed identity use ManagedIdentityId.SystemAssigned. For user assigned managed identity use ManagedIdentityId.WithUserAssignedClientId("clientId") or ManagedIdentityId.WithUserAssignedResourceId("resourceId") or ManagedIdentityId.WithUserAssignedObjectId("objectid"). For more details see https://aka.ms/msal-net-managed-identity Gets the identifier for a user-assigned managed identity. This property holds the unique identifier of the user-assigned managed identity. It can be a client ID, a resource ID, or an object ID, depending on how the managed identity is configured. The identifier string of the user-assigned managed identity. Gets the type of identifier used for the managed identity. This property indicates the type of the managed identity identifier, which can be either a client ID, a resource ID, or an object ID. The enumeration value representing the managed identity identifier type. Gets a value indicating whether the managed identity is user-assigned. This property is true if the managed identity is user-assigned, and false if it is system-assigned. True if the managed identity is user-assigned; otherwise, false. Create an instance of ManagedIdentityId for a system assigned managed identity. Create an instance of ManagedIdentityId for a user assigned managed identity from a client id. Client id of the user assigned managed identity assigned to the azure resource. Instance of ManagedIdentityId. Create an instance of ManagedIdentityId for a user assigned managed identity from a resource id. Resource id of the user assigned managed identity assigned to the azure resource. Instance of ManagedIdentityId. Create an instance of ManagedIdentityId for a user assigned managed identity from an object id. Object id of the user assigned managed identity assigned to the azure resource. Instance of ManagedIdentityId. Enum to represent the type of MSAL application. Details about the HTTP request and configuration properties used to construct a proof of possession request. POP tokens are signed by the process making the request. By default, MSAL will generate a key in memory. To use a hardware key or an external key, implement . Creates a configuration using the default key management - an RSA key will be created in memory and rotated every 8h. Uses , etc. to control which elements of the request should be included in the POP token. See https://datatracker.ietf.org/doc/html/draft-ietf-oauth-signed-http-request-03#page-3 for details about signed HTTP requests. Creates a configuration using the default key management, and which binds all the details of the HttpRequestMessage. Currently only the HttpMethod (m), UrlHost (u) and UrlPath (p) are used to create the signed HTTP request - see https://datatracker.ietf.org/doc/html/draft-ietf-oauth-signed-http-request-03#page-3 Creates a configuration using the default key management, and which binds only the Uri part of the HTTP request. The UrlHost (u) and UrlPath (p) are used to create the signed HTTP request - see https://datatracker.ietf.org/doc/html/draft-ietf-oauth-signed-http-request-03#page-3 The HTTP method ("GET", "POST" etc.) method that will be bound to the token. Leave null and the POP token will not be bound to the method. Corresponds to the "m" part of the a signed HTTP request. Optional. See https://datatracker.ietf.org/doc/html/draft-ietf-oauth-signed-http-request-03#section-3 The URL host of the protected API. The "u" part of a signed HTTP request. This MAY include the port separated from the host by a colon in host:port format. Optional. The "p" part of the signed HTTP request. An extensibility point that allows developers to define their own key management. Leave null and MSAL will use a default implementation, which generates an RSA key pair in memory and refreshes it every 8 hours. Important note: if you want to change the key (e.g. rotate the key), you should create a new instance of this object, as MSAL.NET will keep a thumbprint of keys in memory. If the protected resource (RP) requires use of a special nonce, they will publish it as part of the WWWAuthenticate header associated with a 401 HTTP response or as part of the AuthorityInfo header associated with 200 response. Set it here to make it part of the Signed HTTP Request part of the POP token. Allows app developers to bypass the creation of the SignedHttpRequest envelope by setting this property to false. App developers can use a package like Microsoft.IdentityModel.Protocols.SignedHttpRequest to later create and sign the envelope. If set to false, you do not need to implement the method when using custom keys. Creates a PublicClientApplicationBuilder from public client application configuration options. See https://aka.ms/msal-net-application-configuration Public client applications configuration options A from which to set more parameters, and to create a public client application instance Creates a PublicClientApplicationBuilder from a clientID. See https://aka.ms/msal-net-application-configuration Client ID (also known as App ID) of the application as registered in the application registration portal (https://aka.ms/msal-net-register-app)/. A from which to set more parameters, and to create a public client application instance Configures the public client application to use the recommended reply URI for the platform. See https://aka.ms/msal-net-default-reply-uri. Platform Default Reply URI .NET desktop `https://login.microsoftonline.com/common/oauth2/nativeclient` For system browser on .NET Core http://localhost NOTE:There will be an update to the default redirect URI in the future to accommodate for system browsers on the .NET desktop and .NET Core platforms. A from which to set more parameters, and to create a public client application instance Enables multi cloud support for this instance of public client application. It enables applications to use in a global public cloud authority to the library and can still get tokens for resources from sovereign clouds. Enable or disable multi cloud support. A from which to set more parameters, and to create a public client application instance This feature is available to Microsoft applications, which have the same client id across all clouds You can specify a Keychain Access Group to use for persisting the token cache across multiple applications. This enables you to share the token cache between several applications having the same Keychain access group. Sharing the token cache allows single sign-on between all of the applications that use the same Keychain access Group. See https://aka.ms/msal-net-ios-keychain-security-group for more information. A from which to set more parameters, and to create a public client application instance Allows customization of the Windows 10 Broker experience. Sets a reference to the ViewController (if using iOS), Activity (if using Android) IWin32Window or IntPtr (if using .Net Framework). Used for invoking the browser. Mandatory only on Android to be set either from here or from AcquireTokenInteractive builder. See https://aka.ms/msal-net-android-activity for further documentation and details. The parent as an object, so that it can be used from shared NetStandard assemblies The builder to chain the .With methods Adds a known authority corresponding to a generic OpenIdConnect Identity Provider. MSAL will append ".well-known/openid-configuration" to the authority and retrieve the OIDC metadata from there, to figure out the endpoints. See https://openid.net/specs/openid-connect-core-1_0.html#Terminology Experimental on public clients. Do not use this method with Entra ID authorities (e.g. https://login.microsfoftonline.com/common). Use WithAuthority(string) instead. Sets a reference to the current ViewController that triggers the browser to be shown. A function to return the current ViewController The builder to chain the .With methods Sets the parameters required to get a Kerberos Ticket from Azure AD service. Service principal name to get Kerberos Service Ticket. Specify where the Kerberos ticket will be returned - as a claim in the ID token or as a claim in the access token. If the ticket is for the client application, use the ID token. If the ticket is for the downstream API, use the access token. The expiry of the Kerberos ticket is tied to the expiry of the token that contains it. MSAL provides several helper APIs to read and write Kerberos tickets from the Windows Ticket Cache - see . Returns true if a broker can be used. This method is only needed to be used in mobile scenarios which support Mobile Application Management. In other supported scenarios, use WithBroker by itself, which will fall back to use a browser if broker is unavailable. On Windows, the broker (WAM) can be used on Windows 10 and is always installed. See https://aka.ms/msal-net-wam On Mac, Linux, and older versions of Windows a broker is not available. In .NET classic or .NET, install Microsoft.Identity.Client.Desktop first and call WithDesktopFeatures(). In mobile apps, the device must be Intune joined and Authenticator or Company Portal must be installed. See https://aka.ms/msal-brokers Builds an instance of from the parameters set in the . Thrown when errors occur locally in the library itself (for example, because of incorrect configuration). An instance of Configuration options for a public client application (desktop/mobile app). See https://aka.ms/msal-net/application-configuration A simple implementation that writes data using System.Diagnostics.Trace. This API is experimental and it may change in future versions of the library without an major version increment This API is experimental and it may change in future versions of the library without an major version increment This API is experimental and it may change in future versions of the library without an major version increment This API is experimental and it may change in future versions of the library without an major version increment This API is experimental and it may change in future versions of the library without an major version increment This API is experimental and it may change in future versions of the library without an major version increment Default authority used for interactive calls. Parsed authentication headers to retrieve header values from . Parameters returned by the WWW-Authenticate header. This allows for dynamic scenarios such as Claims challenge, Continuous Access Evaluation (CAE), and Conditional Access auth context. See our documentation for additional details. Parameters returned by the Authentication-Info header. This allows for more complex authentication scenarios, such as Proof-Of-Possession. Nonce parsed from . This is acquired from the Proof-of-Possession WWW-Authenticate header or the Authentication-Info header Creates the authentication parameters by attempting to call the resource unauthenticated and analyzing the response. Resource URI. Cancellation token to cancel the operation. An instance of containing authentication header data. Resource URI. Instance of to make the request with. Cancellation token to cancel the operation. Thrown if the resourceUri or httpClient is null. Creates a parsed set of parameters from the provided . HTTP response headers. For known values, such as the nonce used for Proof-of-Possession, the parser will first check for it in the WWW-Authenticate headers If it cannot find it, it will then check the Authentication-Info parameters for the value. An instance of . Creates a new instance. Creates a key-value pair from an expression of the form a=b if possible. Otherwise, the key value pair will be returned as (key:, value:). assignment authScheme An instance of . Parameters returned by the Authentication-Info header. This allows for scenarios such as proof-of-possession, etc. See https://www.rfc-editor.org/rfc/rfc7615 The next nonce to be used in the preceding authentication request. Return the of key . Name of the raw parameter to retrieve. The raw parameter if it exists, or throws a otherwise. Dictionary of raw parameters in the Authentication-Info header (extracted from the Authentication-Info header string value, without any processing). This allows support for APIs which are not mappable easily to the standard or framework specific (Microsoft.Identity.Model, Microsoft.Identity.Web). Create Authentication-Info parameters from the HttpResponseHeaders for each auth scheme. HttpResponseHeaders. Authentication-Info provided by the endpoint Contains the results of one token acquisition operation in or ConfidentialClientApplication. For details see https://aka.ms/msal-net-authenticationresult Constructor meant to help application developers test their apps. Allows mocking of authentication flows. App developers should never new-up in product code. Access Token that can be used as a bearer token to access protected web APIs Account information Expiry date-time for the access token See ID token See Granted scope values as returned by the service Identifier for the Azure AD tenant from which the token was acquired. Can be null Unique Id of the account. It can be null. When the is not null, this is its ID, that is its ObjectId claim, or if that claim is null, the Subject claim. The correlation id of the authentication request The token type, defaults to Bearer. Note: this property is experimental and may change in future versions of the library. Contains metadata related to the Authentication Result. Claims from the ID token Auth Code returned by the Microsoft identity platform when you use AcquireTokenByAuthorizationCode.WithSpaAuthorizationCode(). This auth code is meant to be redeemed by the frontend code. See https://aka.ms/msal-net/spa-auth-code Other properties from the token response. Constructor meant to help application developers test their apps. Allows mocking of authentication flows. App developers should never new-up in product code. Access Token that can be used as a bearer token to access protected web APIs Account information Expiry date-time for the access token See ID token See Granted scope values as returned by the service Identifier for the Azure AD tenant from which the token was acquired. Can be null Unique Id of the account. It can be null. When the is not null, this is its ID, that is its ObjectId claim, or if that claim is null, the Subject claim. The correlation id of the authentication request Contains metadata related to the Authentication Result. The token type, defaults to Bearer. Note: this property is experimental and may change in future versions of the library. For backwards compatibility with MSAL 4.17-4.20 Access Token that can be used as a bearer token to access protected web APIs In case when Azure AD has an outage, to be more resilient, it can return tokens with an expiration time, and also with an extended expiration time. The tokens are then automatically refreshed by MSAL when the time is more than the expiration time, except when ExtendedLifeTimeEnabled is true and the time is less than the extended expiration time. This goes in pair with Web APIs middleware which, when this extended life time is enabled, can accept slightly expired tokens. Client applications accept extended life time tokens only if the ExtendedLifeTimeEnabled Boolean is set to true on ClientApplicationBase. This feature is not in use Gets the Unique Id of the account in this It is set as the oid (ObjectId) claim, or if that claim is null, as the sub (Subject) claim which is guaranteed not-null. The oid claim identifies a user in all apps - Microsoft Identity Providers issue ID tokens with this claim, although it can be null in rare cases. The sub claim is "a locally unique and never reassigned identifier within the Issuer for the End-User" as per https://openid.net/specs/openid-connect-core-1_0.html and it is a mandatory claim with OIDC compliant issuers. Guest AAD accounts have different oid claim values in each tenant. Use to uniquely identify users across tenants. See https://docs.microsoft.com/azure/active-directory/develop/id-tokens#payload-claims Gets the point in time in which the Access Token returned in the property ceases to be valid. This value is calculated based on current UTC time measured locally and the value expiresIn received from the service. Gets the point in time in which the Access Token returned in the AccessToken property ceases to be valid in MSAL's extended LifeTime. This value is calculated based on current UTC time measured locally and the value ext_expiresIn received from the service. Gets an identifier for the Azure AD tenant from which the token was acquired. This property will be null if tenant information is not returned by the service. Gets the account information. Some elements in might be null if not returned by the service. The account can be passed back in some API overloads to identify which account should be used such as or for instance Gets the Id Token if returned by the service or null if no Id Token is returned. Gets the granted scope values returned by the service. Gets the correlation id used for the request. Identifies the type of access token. By default tokens returned by Azure Active Directory are Bearer tokens. for getting an HTTP authorization header from an AuthenticationResult. Gets the SPA Authorization Code, if it was requested using WithSpaAuthorizationCode method on the AcquireTokenByAuthorizationCode builder. See https://aka.ms/msal-net/spa-auth-code for details. Exposes additional response parameters returned by the token issuer (AAD). Not all parameters are added here, only the ones that MSAL doesn't interpret itself and only scalars. Not supported on mobile frameworks (e.g. net6-android or net6-ios) All the claims present in the ID token. Contains metadata for the Authentication result. Creates the content for an HTTP authorization header from this authentication result, so that you can call a protected API Created authorization header of the form "Bearer {AccessToken}" Here is how you can call a protected API from this authentication result (in the result variable): HttpClient client = new HttpClient(); client.DefaultRequestHeaders.Add("Authorization", result.CreateAuthorizationHeader()); HttpResponseMessage r = await client.GetAsync(urlOfTheProtectedApi); In MSAL.NET 1.x, returned the user who signed in to get the authentication result. From MSAL 2.x rather use instead. See https://aka.ms/msal-net-2-released for more details. Contains metadata of the authentication result. for additional MSAL-wide metrics. Constructor for the class AuthenticationResultMetadata The token source. The source of the token in the result. The token endpoint used to contact the Identity Provider (e.g. Azure Active Directory). Can be null, for example when the token comes from the cache. This may be different from the endpoint you'd infer from the authority configured in the application object: - if regional auth is used. - if AAD instructs MSAL to use a different environment. - if the authority or tenant is overridden at the request level. - during a refresh_token operation, when MSAL must resolve "common" and "organizations" to a tenant ID. Time, in milliseconds, spent to service this request. Includes time spent making HTTP requests , time spent in token cache callbacks , time spent in MSAL and context switching. Time, in milliseconds, MSAL spent during this request reading and writing to the token cache, i.e. in the OnBeforeAccess, OnAfterAccess, etc. callbacks. Does not include internal MSAL logic for searching through the cache once loaded. Time, in milliseconds, MSAL spent for HTTP communication during this request. Specifies the time when the cached token should be proactively refreshed. This value may be null if proactive refresh is not enabled. Specifies the reason for fetching the access token from the identity provider. Indicates the type of cache that the token was read from. Contains the outcome of the region discovery if region was used. May contain telemetry data. Currently it is emitted only for desktop public client flows when the broker is used and it is also included in the verbose logs. May contain Personal Identifiable Information (PII), as per the logging settings. See https://aka.ms/msal-net-logging for more details about logging. For backwards compatibility reasons, keep the cache key unchanged for Bearer and SSH tokens. For PoP and future tokens, the cache should support both several types of tokens for the same scope (e.g. PoP and Bearer) Used to modify the experience depending on the type of token asked. Value to log to telemetry to indicate pop usage. Prefix for the HTTP header that has the token. E.g. "Bearer" or "POP" Extra parameters that are added to the request to the /token endpoint. Name and values of params Key ID of the public / private key pair used by the encryption algorithm, if any. Tokens obtained by authentication schemes that use this are bound to the KeyId, i.e. if a different kid is presented, the access token cannot be used. Creates the access token that goes into an Authorization HTTP header. Expected to match the token_type parameter returned by ESTS. Used to disambiguate between ATs of different types (e.g. Bearer and PoP) when loading from cache etc. The default implementation will store a key in memory Creates the canonical representation of the JWK. See https://tools.ietf.org/html/rfc7638#section-3. The number of parameters as well as the lexicographic order is important, as this string will be hashed to get a thumbprint. An abstraction over an the asymmetric key operations needed by POP, that encapsulates a pair of public and private keys and some typical crypto operations. All symmetric operations are SHA256. Important: The 2 methods on this interface will be called at different times but MUST return details of the same private / public key pair, i.e. do not change to a different key pair mid way. Best to have this class immutable. Ideally there should be a single public / private key pair associated with a machine, so implementers of this interface should consider exposing a singleton. The canonical representation of the JWK. See https://tools.ietf.org/html/rfc7638#section-3 Algorithm used to sign proof of possession request. See EC algorithms for ECD. See RSA algorithms for RSA. Signs the byte array using the private key Names for Json Web Key Values Constants for JsonWebAlgorithms "kty" Key Type (sec 6.1) http://tools.ietf.org/html/rfc7518#section-6.1 Creates POP tokens, i.e. tokens that are bound to an HTTP request and are digitally signed. Currently the signing credential algorithm is hard-coded to RSA with SHA256. Extensibility should be done by integrating Wilson's SigningCredentials For PoP, we chose to use the base64(jwk_thumbprint) A key ID that uniquely describes a public / private key pair. While KeyID is not normally strict, AAD support for PoP requires that we use the base64 encoded JWK thumbprint, as described by https://tools.ietf.org/html/rfc7638 Creates a JWS (json web signature) as per: https://tools.ietf.org/html/rfc7515 Format: header.payload.signed_payload Access token with response cnf https://tools.ietf.org/html/draft-ietf-oauth-signed-http-request-03#section-3 Http method (GET or POST) https://tools.ietf.org/html/draft-ietf-oauth-signed-http-request-03#section-3 Timestamp https://tools.ietf.org/html/draft-ietf-oauth-signed-http-request-03#section-3 Uri host https://tools.ietf.org/html/draft-ietf-oauth-signed-http-request-03#section-3 Uri path https://tools.ietf.org/html/draft-ietf-oauth-signed-http-request-03#section-3 Uri path https://tools.ietf.org/html/draft-ietf-oauth-signed-http-request-03#section-3 Confirmation claim. By including this in a JWT, the issuer states that the presenter possesses a particular key (i.e. the private key) and that the recipient can confirm this cryptographically. https://tools.ietf.org/html/rfc7800 Also part of the confirmation claim. Non-standard claim representing a nonce that protects against replay attacks. This factory ensures key rotation every 8h Specifies the token type to log to telemetry. Bearer token type. Pop token type. Ssh-cert token type. External token type. Contains the results of an ADAL token acquisition. Access Tokens from ADAL are not compatible with MSAL, only Refresh Tokens are. Gets user information including user Id. Some elements in UserInfo might be null if not returned by the service. Gets the Refresh Token associated with the requested Access Token. Note: not all operations will return a Refresh Token. Gets a value indicating whether the refresh token can be used for requesting access token for other resources. Serializes the object to a JSON string Deserialized authentication result Serializes the object to a JSON string Serialized authentication result Determines what type of subject the token was issued for. User Client UserPlusClient: This is for confidential clients used in middle tier. can be used with Linq to access items from the TokenCache dictionary. For the purposes of MSAL, the resource is irrelevant, since only RTs can be migrated. Determines whether the specified object is equal to the current object. true if the specified object is equal to the current object; otherwise, false. The object to compare with the current object. 2 Determines whether the specified TokenCacheKey is equal to the current object. true if the specified TokenCacheKey is equal to the current object; otherwise, false. The TokenCacheKey to compare with the current object. 2 Returns the hash code for this TokenCacheKey. A 32-bit signed integer hash code. Contains information of a single user. This information is used for token cache lookup. Also if created with userId, userId is sent to the service when login_hint is accepted. Create user information for token cache lookup Create user information copied from another UserInfo object Gets identifier of the user authenticated during token acquisition. Gets a displayable value in UserPrincipalName (UPN) format. The value can be null. Gets given name of the user if provided by the service. If not, the value is null. Gets family name of the user if provided by the service. If not, the value is null. Gets the time when the password expires. Default value is 0. Gets the URL where the user can change the expiring password. The value can be null. Gets identity provider if returned by the service. If not, the value is null. Data class, common to ADAL.NET and MSAL.NET V2 used for the token cache serialization in a dual format: the ADAL V3 cache format, and the new unified cache format, common to ADAL.NET 4.x, MSAL.NET 2.x and other libraries in the same Operating System (for instance ADAL and MSAL for objective C in iOS) Array of bytes containing the serialized cache in ADAL.NET V3 format Array of bytes containing the serialized MSAL.NET V2 cache Returns a tuple where Item1 is a map of ClientInfo -> AdalUserInfo for those users that have ClientInfo Item2 is a list of AdalUserInfo for those users that do not have ClientInfo Algorithm to delete: DisplayableId cannot be null Removal is scoped by environment and clientId; If accountId != null then delete everything with the same clientInfo otherwise, delete everything with the same displayableId Notes: - displayableId can change rarely - ClientCredential Grant uses the app token cache, not the user token cache, so this algorithm does not apply (nor will GetAccounts / RemoveAccount work) Responsible for computing: - external distributed cache key (from request and responses) - internal cache partition keys (as above, but also from cache items) These are the same string, but MSAL cannot control if the app developer actually uses distributed caching. However, MSAL's in-memory cache needs to be partitioned, and this class computes the partition key. Identifies the type of cache that the token was read from. Token cache serialization implementations must provide this value. Indicates that the token was retrieved from the identity provider. Indicates that the cache level used is unknown. Token was retrieved from cache but the token cache implementation didn't specify which cache level was used. Indicates that the token was read from the L1 cache. Indicates that the token was read from the L2 cache. MSAL should only interact with the cache though this object. It is responsible for firing cache notifications. Flows should only perform (at most) 2 cache accesses: one to read data and one to write tokens. Reading data multiple times (e.g. read all ATs, read all RTs) should not refresh the cache from disk because of performance impact. Write operations are still the responsibility of TokenCache. Possibly refreshes the internal cache by calling OnBeforeAccessAsync and OnAfterAccessAsync delegates. Creates a new object with a different expires on Used to find the token in the cache. Can be a token assertion hash (normal OBO flow) or a user provided key (long-running OBO flow). Used when the token is bound to a public / private key pair which is identified by a key id (kid). Currently used by PoP tokens Example account json: "authority_type":"MSSTS", "client_info":"", "environment":"login.windows.net", "family_name":"", "given_name":"Some Name", "home_account_id":"69c374a4-1df6-46f8-b83a-a2fcd8823ee2.49f548d0-12b7-4169-a390-bb5304d24462", "local_account_id":"69c374a4-1df6-46f8-b83a-a2fcd8823ee2", "middle_name":"", "name":"Some Name", "realm":"49f548d0-12b7-4169-a390-bb5304d24462", "username":"subzero@bogavrilltd.onmicrosoft.com", "wam_account_ids":"{\"00000000480FA373\":\"ob7b8h79td9gs6hfqoh2r37m\",\"4b0db8c2-9f26-4417-8bde-3f0e3656f8e0\":\"ob7b8h79td9gs6hfqoh2r37m\"}" WAM special implementation: MSA accounts (and also AAD accounts) cannot be discovered through WAM however the broker offers an interactive experience for the user to login, even with an MSA account. After an interactive login, MSAL must be able to silently login the MSA user. To do this, MSAL must save the account ID in its token cache. Accounts with associated WAM account ID can be used in silent WAM flows. Apps shouldn't rely on its presence, unless the app itself wrote it. It means that SDK should translate absence of app metadata to the default values of its required fields. Other apps that don't support app metadata should never remove existing app metadata. App metadata is a non-removable entity.It means there's no need for a public API to remove app metadata, and it shouldn't be removed when removeAccount is called. App metadata is a non-secret entity. It means that it cannot store any secret information, like tokens, nor PII, like username etc. App metadata can be extended by adding additional fields when required.Absence of any non-required field should translate to default values for those field. mandatory mandatory The family id of which this application is part of. This is an internal feature and there is currently a single app, with id 1. If familyId is empty, it means an app is not part of a family. A missing entry means unknown status. Important: order matters. This MUST be the last one called since it will extract the remaining fields out. Optional. A value here means the token in an FRT. Used to find the token in the cache. Can be a token assertion hash (normal OBO flow) or a user provided key (long-running OBO flow). Family Refresh Tokens, can be used for all clients part of the family Returns all access tokens from the underlying cache collection. If is specified, returns access tokens from that partition only. WARNING: if partitionKey is null, this API is slow as it loads all tokens, not just from 1 partition. It should only support external token caching, in the hope that the external token cache is partitioned. Not all classes that implement this method are required to filter by partition (e.g. mobile) Returns all refresh tokens from the underlying cache collection. If is specified, returns refresh tokens from that partition only. WARNING: if partitionKey is null, this API is slow as it loads all tokens, not just from 1 partition. It should only support external token caching, in the hope that the external token cache is partitioned. Not all classes that implement this method are required to filter by partition (e.g. mobile) Returns all ID tokens from the underlying cache collection. If is specified, returns ID tokens from that partition only. WARNING: if partitionKey is null, this API is slow as it loads all tokens, not just from 1 partition. It should only support external token caching, in the hope that the external token cache is partitioned. Not all classes that implement this method are required to filter by partition (e.g. mobile) Returns all accounts from the underlying cache collection. If is specified, returns accounts from that partition only. WARNING: if partitionKey is null, this API is slow as it loads all tokens, not just from 1 partition. It should only support external token caching, in the hope that the external token cache is partitioned. Not all classes that implement this method are required to filter by partition (e.g. mobile) WARNING: this API is slow as it loads all tokens, not just from 1 partition. It should only support external token caching, in the hope that the external token cache is partitioned. The dictionary serializer does not handle unknown nodes. Specifies the reason for fetching the access token from the identity provider when using AcquireTokenSilent, AcquireTokenForClient or AcquireTokenOnBehalfOf. When a token is found in the cache or the cache is not supposed to be hit when making the request (interactive call, username password call, device code flow, etc.) When the token request goes to the identity provider because force_refresh was set to true. Also occurs if WithClaims() is used. When the token request goes to the identity provider because no cached access token exists When the token request goes to the identity provider because cached access token expired When the token request goes to the identity provider because refresh_in was used and the existing token needs to be refreshed Details on the configuration of the ClientApplication for debugging purposes. Returns all the available accounts in the user token cache for the application. Get the collection by its identifier among the accounts available in the token cache, based on the user flow. This is for Azure AD B2C scenarios. The identifier is the user flow being targeted by the specific B2C authority/>. Cancellation token Get the by its identifier among the accounts available in the token cache. Account identifier. The identifier is typically the value of the property of . You typically get the account ID from an by using the property> Cancellation token Removes all tokens in the cache for the specified account. Instance of the account that needs to be removed Removes all tokens in the cache for the specified account. Instance of the account that needs to be removed Cancellation token In MSAL 1.x returned an enumeration of . From MSAL 2.x, use instead. See https://aka.ms/msal-net-2-released for more details. In MSAL 1.x, return a user from its identifier. From MSAL 2.x, use instead. See https://aka.ms/msal-net-2-released for more details. Identifier of the user to retrieve the user in the cache with the identifier passed as an argument In MSAL 1.x removed a user from the cache. From MSAL 2.x, use instead. See https://aka.ms/msal-net-2-released for more details. User to remove from the cache Identifier of the component (libraries/SDK) consuming MSAL.NET. This will allow for disambiguation between MSAL usage by the app vs MSAL usage by component libraries. Sets or Gets a custom query parameters that may be sent to the STS for dogfood testing or debugging. This is a string of segments of the form key=value separated by an ampersand character. Unless requested otherwise, this parameter should not be set by application developers as it may have adverse effect on the application. Gets/sets a boolean value telling the application if the authority needs to be verified against a list of known authorities. The default value is true. It should currently be set to false for Azure AD B2C authorities as those are customer specific (a list of known B2C authorities cannot be maintained by MSAL.NET). This property can be set just after the construction of the application and before an operation acquiring a token or interacting with the STS. The redirect URI (also known as Reply URI or Reply URL), is the URI at which Azure AD will contact back the application with the tokens. This redirect URI needs to be registered in the app registration (https://aka.ms/msal-net-register-app). In MSAL.NET, define the following default RedirectUri values: https://login.microsoftonline.com/common/oauth2/nativeclient for desktop (.NET Framework and .NET Core) applications msal{ClientId} for Xamarin iOS and Xamarin Android (as this will be used by the system web browser by default on these platforms to call back the application) These default URIs could change in the future. In Microsoft.Identity.Client.ConfidentialClientApplication, this can be the URL of the web application / web API. This is especially important when you deploy an application that you have initially tested locally; you then need to add the reply URL of the deployed application in the application registration portal Gets the Client ID (also known as Application ID) of the application as registered in the application registration portal (https://aka.ms/msal-net-register-app) and as passed in the constructor of the application [V2 API] Attempts to acquire an access token for the from the user token cache, with advanced parameters controlling network call. Scopes requested to access a protected API Account for which the token is requested. Specific authority for which the token is requested. Passing a different value than configured in the application constructor narrows down the selection to a specific tenant. This does not change the configured value in the application. This is specific to applications managing several accounts (like a mail client with several mailboxes) If true, ignore any access token in the cache and attempt to acquire new access token using the refresh token for the account if this one is available. This can be useful in the case when the application developer wants to make sure that conditional access policies are applied immediately, rather than after the expiration of the access token An containing the requested access token can be thrown in the case where an interaction is required with the end user of the application, for instance, if no refresh token was in the cache,a or the user needs to consent, or re-sign-in (for instance if the password expired), or performs two factor authentication The access token is considered a match if it contains at least all the requested scopes. This means that an access token with more scopes than requested could be returned as well. If the access token is expired or close to expiration (within a 5 minute window), then the cached refresh token (if available) is used to acquire a new access token by making a silent network call. See https://aka.ms/msal-net-acquiretokensilent for more details [V2 API] Attempts to acquire an access token for the from the user token cache. Scopes requested to access a protected API Account for which the token is requested. An containing the requested token can be thrown in the case where an interaction is required with the end user of the application, for instance so that the user consents, or re-signs-in (for instance if the password expired), or performs two factor authentication The access token is considered a match if it contains at least all the requested scopes. This means that an access token with more scopes than requested could be returned as well. If the access token is expired or close to expiration (within a 5 minute window), then the cached refresh token (if available) is used to acquire a new access token by making a silent network call. See https://aka.ms/msal-net-acquiretokensilent for more details Instructs MSAL to try to auto discover the Azure region. Stops an in-progress long-running on-behalf-of session by removing the tokens associated with the provided cache key. See Long-running OBO in MSAL.NET. OBO cache key used to remove the tokens. Cancellation token. True if tokens are removed from the cache; false, otherwise. is not set. The certificate used to create this , if any. [V2 API] Acquires an access token for this application (usually a web API) from the authority configured in the application, in order to access another downstream protected web API on behalf of a user using the OAuth 2.0 On-Behalf-Of flow. (See https://aka.ms/msal-net-on-behalf-of). This confidential client application was itself called with a token which will be provided in the userAssertion parameter. Scopes requested to access a protected API Instance of containing credential information about the user on behalf of whom to get a token. Authentication result containing a token for the requested scopes and account for the on-behalf-of flow when specifying the authority which is the corresponding V3 API. [V2 API] Acquires an access token for this application (usually a web API) from a specific authority, in order to access another downstream protected web API on behalf of a user (See https://aka.ms/msal-net-on-behalf-of). This confidential client application was itself called with a token which will be provided in the userAssertion parameter. Scopes requested to access a protected API Instance of containing credential information about the user on behalf of whom to get a token. Specific authority for which the token is requested. Passing a different value than configured does not change the configured value Authentication result containing a token for the requested scopes and account for the on-behalf-of flow without specifying the authority which is the corresponding V3 API. [V2 API] Acquires an access token for this application (usually a web API) from the authority configured in the application, in order to access another downstream protected web API on behalf of a user using the OAuth 2.0 On-Behalf-Of flow. (See https://aka.ms/msal-net-on-behalf-of). This confidential client application was itself called with a token which will be provided in the userAssertion parameter. This override sends the certificate, which helps certificate rotation in Azure AD Scopes requested to access a protected API Instance of containing credential information about the user on behalf of whom to get a token. Authentication result containing a token for the requested scopes and account which is the corresponding V3 API [V2 API] Acquires an access token for this application (usually a web API) from a specific authority, in order to access another downstream protected web API on behalf of a user (See https://aka.ms/msal-net-on-behalf-of). This confidential client application was itself called with a token which will be provided in the This override sends the certificate, which helps certificate rotation in Azure AD userAssertion parameter. Scopes requested to access a protected API Instance of containing credential information about the user on behalf of whom to get a token. Specific authority for which the token is requested. Passing a different value than configured does not change the configured value Authentication result containing a token for the requested scopes and account which is the corresponding V3 API [V2 API] Acquires a security token from the authority configured in the app using the authorization code previously received from the STS. It uses the OAuth 2.0 authorization code flow (See https://aka.ms/msal-net-authorization-code). It's usually used in web apps (for instance ASP.NET / ASP.NET Core web apps) which sign-in users, and therefore receive an authorization code. This method does not lookup the token cache, but stores the result in it, so it can be looked up using other methods such as . The authorization code received from service authorization endpoint. Scopes requested to access a protected API Authentication result containing token of the user for the requested scopes which is the corresponding V2 API [V3 API] Acquires a token from the authority configured in the app, for the confidential client itself (in the name of no user) using the client credentials flow. (See https://aka.ms/msal-net-client-credentials) scopes requested to access a protected API. For this flow (client credentials), the scopes should be of the form "{ResourceIdUri/.default}" for instance https://management.azure.net/.default or, for Microsoft Graph, https://graph.microsoft.com/.default as the requested scopes are really defined statically at application registration in the portal, and cannot be overridden in the application. See also Authentication result containing the token of the user for the requested scopes [V2 API] Acquires a token from the authority configured in the app, for the confidential client itself (in the name of no user) using the client credentials flow. (See https://aka.ms/msal-net-client-credentials) Scopes requested to access a protected API. For this flow (client credentials), the scopes should be of the form "{ResourceIdUri/.default}" for instance https://management.azure.net/.default or, for Microsoft Graph, https://graph.microsoft.com/.default as the requested scopes are really defined statically at application registration in the portal, and cannot be overridden in the application If true, API will ignore the access token in the cache and attempt to acquire new access token using client credentials. This override can be used in case the application knows that conditional access policies changed Authentication result containing token of the user for the requested scopes which is the corresponding V3 API [V2 API] Acquires token from the service for the confidential client using the client credentials flow. (See https://aka.ms/msal-net-client-credentials) This method enables application developers to achieve easy certificate roll-over in Azure AD: this method will send the public certificate to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation) Scopes requested to access a protected API Authentication result containing application token for the requested scopes which is the corresponding V3 API [V2 API] Acquires token from the service for the confidential client using the client credentials flow. (See https://aka.ms/msal-net-client-credentials) This method attempts to look up valid access token in the cache unless is true This method enables application developers to achieve easy certificate roll-over in Azure AD: this method will send the public certificate to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation) Scopes requested to access a protected API If TRUE, API will ignore the access token in the cache and attempt to acquire new access token using client credentials Authentication result containing application token for the requested scopes which is the corresponding V3 API Acquires an access token from an existing refresh token and stores it and the refresh token into the application user token cache, where it will be available for further AcquireTokenSilentAsync calls. This method can be used in migration to MSAL from ADAL v2 and in various integration scenarios where you have a RefreshToken available. (see https://aka.ms/msal-net-migration-adal2-msal2) Scope to request from the token endpoint. Setting this to null or empty will request an access token, refresh token and ID token with default scopes The refresh token (for example previously obtained from ADAL 2.x) [V2 API] Computes the URL of the authorization request letting the user sign-in and consent to the application accessing specific scopes in the user's name. The URL targets the /authorize endpoint of the authority configured in the application. This override enables you to specify a login hint and extra query parameter. Scopes requested to access a protected API Identifier of the user. Generally a UPN. This can be empty This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. URL of the authorize endpoint including the query parameters. which is the corresponding V3 API [V2 API] Computes the URL of the authorization request letting the user sign-in and consent to the application accessing specific scopes in the user's name. The URL targets the /authorize endpoint of the authority specified as the parameter. This override enables you to specify a redirectUri, login hint extra query parameters, extra scope to consent (which are not for the same resource as the ), and an authority. Scopes requested to access a protected API (a resource) Address to return to upon receiving a response from the authority. Identifier of the user. Generally a UPN. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Scopes for additional resources (other than the resource for which are requested), which a developer can request the user to consent to upfront. Specific authority for which the token is requested. Passing a different value than configured does not change the configured value URL of the authorize endpoint including the query parameters. which is the corresponding V3 API This object is returned as part of the device code flow and has information intended to be shown to the user about where to navigate to login and what the device code needs to be entered on that device. See https://aka.ms/msal-device-code-flow. and the other overrides User code returned by the service Device code returned by the service Verification URL where the user must navigate to authenticate using the device code and credentials. Time when the device code will expire. Polling interval time to check for completion of authentication flow. User friendly text response that can be used for display purpose. Identifier of the client requesting device code. List of the scopes that would be held by token. Extensions for all AcquireToken methods Intervenes in the request pipeline, by executing a user provided delegate before MSAL makes the token request. The delegate can modify the request payload by adding or removing body parameters and headers. The builder to chain options to An async delegate which gets invoked just before MSAL makes a token request The builder to chain other options to. Binds the token to a key in the cache.No cryptographic operations is performed on the token. The builder to chain options to A key id to which the access token is associated. The token will not be retrieved from the cache unless the same key id is presented. Can be null. AAD issues several types of bound tokens. MSAL checks the token type, which needs to match the value set by ESTS. Normal POP tokens have this as "pop" the builder Binds the token to a key in the cache. L2 cache keys contain the key id. No cryptographic operations is performed on the token. A key id to which the access token is associated. The token will not be retrieved from the cache unless the same key id is presented. Can be null. AAD issues several types of bound tokens. MSAL checks the token type, which needs to match the value set by ESTS. Normal POP tokens have this as "pop" the builder Extension method enabling MSAL.NET extenders for public client applications to set a custom web UI that will let the user sign-in with Azure AD, present consent if needed, and get back the authorization code Builder for an AcquireTokenInteractive Customer implementation for the Web UI the builder to be able to chain .With methods Extension methods for the Only affects . When enabled, mimics MSAL 4.50.0 and below behavior - checks in cache for cached tokens first, and if not found, then uses user assertion to request new tokens from AAD. When disabled (default behavior), doesn't search in cache, but uses the user assertion to retrieve tokens from AAD. This method should only be used in specific cases for backwards compatibility. For most cases, rely on the default behavior of and described in https://aka.ms/msal-net-long-running-obo . Whether to search in cache. The builder to chain the .With methods The authentication parameters provided to the app token provider callback. Specifies which scopes to request. Correlation id of the authentication request. A string with one or multiple claims. Tenant id of the Used to cancel the authentication attempt made by the token provider Token result from external app token provider This is part of an extensibility mechanism designed to be used by Azure SDK in order to enhance managed identity support. The actual token, usually in JWT format Expiration of token Mandatory When the token should be refreshed. If not set, MSAL will set it to half of the expiry time if that time is longer than 2 hours. Extensibility methods for Allows setting a callback which returns an access token, based on the passed-in parameters. MSAL will pass in its authentication parameters to the callback and it is expected that the callback will construct a and return it to MSAL. MSAL will cache the token response the same way it does for other authentication results. This is part of an extensibility mechanism designed to be used only by Azure SDK in order to enhance managed identity support. Only client_credential flow is supported. Extensibility methods for . Stops an in-progress long-running on-behalf-of session by removing the tokens associated with the provided cache key. See Long-running OBO in MSAL.NET. Client application to remove tokens from. OBO cache key used to remove the tokens. Cancellation token. True if tokens are removed from the cache; false, otherwise. is not set. Interface that an MSAL.NET extender can implement to provide their own web UI in public client applications to sign-in user and have them consented part of the Authorization code flow. MSAL.NET provides an embedded web view for Windows and Mac, but there are other scenarios not yet supported. This extensibility point enables them to provide such UI in a secure way Method called by MSAL.NET to delegate the authentication code web with the Secure Token Service (STS) URI computed by MSAL.NET that will let the UI extension navigate to the STS authorization endpoint in order to sign-in the user and have them consent The redirect URI that was configured. The auth code will be appended to this redirect URI and the browser will redirect to it. The cancellation token to which you should respond to. See Task cancellation for details. The URI returned back from the STS authorization endpoint. This URI contains a code=CODE parameters that MSAL.NET will extract and redeem. The authorizationUri"/> is crafted to leverage PKCE in order to protect the token from a man in the middle attack. Only MSAL.NET can redeem the code. In the event of cancellation, the implementer should return OperationCanceledException. Authentication request details Constructor. Apps should not have to use this constructor. It is provided for testability purposes. Parameters which will be sent in the request body, as POST parameters. Headers which will be sent with the request. The token endpoint, including any query parameters, where the request is being sent to. The cancellation token associated with the request Adds additional Http Headers to the token request. Parameter builder for a acquiring tokens. additional Http Headers to add to the token request. Extensibility methods for Used to determine if the currently available broker is able to perform Proof-of-Possession. Boolean indicating if Proof-of-Possession is supported Extensions that add support for SSH certificates Instructs AAD to return an SSH certificate instead of a Bearer token. The SSH certificate (not the same as public / private key pair used by SSH), can be used to securely deploy a public SSH key to a machine. See https://aka.ms/msal-net-ssh for details. Interactive authentication builder The public SSH key in JWK format (https://tools.ietf.org/html/rfc7517). Currently only RSA is supported, and the JWK should contain only the RSA modulus and exponent A key identifier, it can be in any format. Used to distinguish between different keys when fetching an SSH certificate from the token cache. Instructs AAD to return an SSH certificate instead of a Bearer token. Attempts to retrieve the certificate from the token cache, and if one is not found, attempts to acquire one silently, using the refresh token. See https://aka.ms/msal-net-ssh for details. The same keyID must be used to distinguish between various Silent authentication builder The public SSH key in JWK format (https://tools.ietf.org/html/rfc7517). Currently only RSA is supported, and the JWK should contain only the RSA modulus and exponent We invoke this class from different threads and they all use the same HttpClient. To prevent race conditions, make sure you do not get / set anything on HttpClient itself, instead rely on HttpRequest objects which are thread specific. In particular, do not change any properties on HttpClient such as BaseAddress, buffer sizes and Timeout. You should also not access DefaultRequestHeaders because the getters are not thread safe (use HttpRequestMessage.Headers instead). Performs the GET request just like but does not throw a ServiceUnavailable service exception. Instead, it returns the associated with the request. Performs the POST request just like but does not throw a ServiceUnavailable service exception. Instead, it returns the associated with the request. Performs the POST request just like but does not throw a ServiceUnavailable service exception. Instead, it returns the associated with the request. In HttpManager, the retry policy is based on this simple condition. Avoid changing this, as it's breaking change. Factory to return the instance of HttpManager based on retry configuration and type of MSAL application. HTTP Manager specific to managed identity to implement the retry for specific HTTP status codes. Retry policy specific to managed identity flow. Avoid changing this, as it's breaking change. We invoke this class from different threads and they all use the same HttpClient. To prevent race conditions, make sure you do not get / set anything on HttpClient itself, instead rely on HttpRequest objects which are thread specific. In particular, do not change any properties on HttpClient such as BaseAddress, buffer sizes and Timeout. You should also not access DefaultRequestHeaders because the getters are not thread safe (use HttpRequestMessage.Headers instead). Check common redirect URI problems. Optionally check that the redirect URI is not the OAuth2 standard redirect URI https://login.microsoftonline.com/common/oauth2/nativeclientb when using a system browser, because the browser cannot redirect back to the app. The IAccount interface represents information about a single account. The same user can be present in different tenants, that is, a user can have multiple accounts. An IAccount is returned in the . property, and can be used as parameters of PublicClientApplication and ConfidentialClientApplication methods acquiring tokens such as Gets a string containing the displayable value in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com. This can be null. This property replaces the DisplayableId property of IUser in previous versions of MSAL.NET Gets a string containing the identity provider for this account, e.g. login.microsoftonline.com. This property replaces the IdentityProvider property of IUser in previous versions of MSAL.NET except that IdentityProvider was a URL with information about the tenant (in addition to the cloud environment), whereas Environment is only the AccountId of the home account for the user. This uniquely identifies the user across AAD tenants. Can be null, for example if this account was migrated to MSAL.NET from ADAL.NET v3's token cache Interface used for creation of client applications. For details see https://aka.ms/msal-net-client-applications. Acquires an access token from an existing refresh token and stores it, and the refresh token, in the user token cache, where it will be available for further AcquireTokenSilent calls. This method can be used in migration to MSAL from ADAL v2, and in various integration scenarios where you have a RefreshToken available. See https://aka.ms/msal-net-migration-adal2-msal2. Scope to request from the token endpoint. Setting this to null or empty will request an access token, refresh token and ID token with default scopes The refresh token from ADAL 2.x A builder enabling you to add optional parameters before executing the token request Acquires an access token from an existing refresh token and stores it and the refresh token into the user token cache, where it will be available for further AcquireTokenSilentAsync calls. This method can be used in migration to MSAL from ADAL v2 and in various integration scenarios where you have a RefreshToken available. (see https://aka.ms/msal-net-migration-adal2-msal2) Scope to request from the token endpoint. Setting this to null or empty will request an access token, refresh token and ID token with default scopes The refresh token from ADAL 2.x Interface defining common API methods and properties. Both and extend this class. For details see https://aka.ms/msal-net-client-applications Details on the configuration of the ClientApplication for debugging purposes. User token cache which holds ID tokens, access tokens, and refresh tokens for accounts. It's used and updated silently if needed when calling It is updated by each acquire token method, with the exception of which only uses the application cache (see ). On .NET Framework and .NET Core you can also customize the token cache serialization. See https://aka.ms/msal-net-token-cache-serialization. This is taken care of by MSAL.NET on mobile platforms. It is recommended to use token cache serialization for web site and web api scenarios. Gets the URL of the authority, or the security token service (STS) from which MSAL.NET will acquire security tokens. The return value of this property is either the value provided by the developer in the constructor of the application, or otherwise the value of the static member (that is https://login.microsoftonline.com/common/) Returns all the available accounts in the user token cache for the application. Get the by its identifier among the accounts available in the token cache and of the same environment (authority host) as . Account identifier. The value of the identifier will probably have been stored value from the value of the property of . You typically get the account ID from an by using the property. Only for Azure AD B2C scenarios, get the collection by its identifier among the accounts available in the token cache based on the user flow. The identifier is the user flow being targeted by the specific B2C authority. Attempts to acquire an access token for the from the user token cache, with advanced parameters controlling the network call. See Acquire tokens silently. Scopes requested to access a protected API. Account for which the token is requested. An used to build the token request, adding optional parameters. When an interaction is required with the end user of the application, for instance, if no refresh token was in the cache; the user needs to consent or to re-sign-in (for instance if the password expired); or the user needs to perform two factor authentication. The access token is considered a match if it contains at least all the requested scopes. This means that an access token with more scopes than requested could be returned as well. If the access token is expired or close to expiration (within a 5 minute window), then the cached refresh token (if available) is used to acquire a new access token by making a silent network call. Attempts to acquire an access token for the from the user token cache, with advanced parameters controlling the network call. See Acquire tokens silently. Scopes requested to access a protected API. Typically the username, in UPN format, e.g. johnd@contoso.com. An used to build the token request, adding optional parameters. When an interaction is required with the end user of the application, for instance, if no refresh token was in the cache; the user needs to consent or to re-sign-in (for instance if the password expired); or the user needs to perform two factor authentication. The access token is considered a match if it contains at least all the requested scopes. This means that an access token with more scopes than requested could be returned as well. If the access token is expired or close to expiration (within a 5 minute window), then the cached refresh token (if available) is used to acquire a new access token by making a silent network call. Removes all tokens in the cache for the specified account. Instance of the account that needs to be removed. In MSAL 1.x returned an enumeration of . From MSAL 2.x, use instead. See https://aka.ms/msal-net-2-released for more details. In MSAL 1.x, return a user from its identifier. From MSAL 2.x, use instead. See https://aka.ms/msal-net-2-released for more details. Identifier of the user to retrieve the user in the cache with the identifier passed as an argument In MSAL 1.x removed a user from the cache. From MSAL 2.x, use instead. See https://aka.ms/msal-net-2-released for more details. User to remove from the cache Identifier of the component (libraries/SDK) consuming MSAL.NET. This will allow for disambiguation between MSAL usage by the app vs MSAL usage by component libraries. Sets or Gets a custom query parameters that may be sent to the STS for dogfood testing or debugging. This is a string of segments of the form key=value separated by an ampersand character. Unless requested otherwise, this parameter should not be set by application developers as it may have adverse effect on the application. Gets a boolean value telling the application if the authority needs to be verified against a list of known authorities. The default value is true. It should currently be set to false for Azure AD B2C authorities as those are customer specific (a list of known B2C authorities cannot be maintained by MSAL.NET) The redirect URI (also known as Reply URI or Reply URL), is the URI at which Azure AD will contact back the application with the tokens. This redirect URI needs to be registered in the app registration (https://aka.ms/msal-net-register-app) In MSAL.NET, define the following default RedirectUri values: urn:ietf:wg:oauth:2.0:oob for desktop (.NET Framework and .NET Core) applications msal{ClientId} for Xamarin iOS and Xamarin Android (as this will be used by the system web browser by default on these platforms to call back the application) These default URIs could change in the future. In , this can be the URL of the web application / web API. This is especially important when you deploy an application that you have initially tested locally; you then need to add the reply URL of the deployed application in the application registration portal. Attempts to acquire an access token for the from the user token cache. Scopes requested to access a protected API Account for which the token is requested. An containing the requested token can be thrown in the case where an interaction is required with the end user of the application, for instance so that the user consents, or re-signs-in (for instance if the password expired), or performs two factor authentication The access token is considered a match if it contains at least all the requested scopes. This means that an access token with more scopes than requested could be returned as well. If the access token is expired or close to expiration (within 5 minute window), then the cached refresh token (if available) is used to acquire a new access token by making a silent network call. See https://aka.ms/msal-net-acuiretokensilent for more details Attempts to acquire and access token for the from the user token cache, with advanced parameters making a network call. Scopes requested to access a protected API Account for which the token is requested. Specific authority for which the token is requested. Passing a different value than configured in the application constructor narrows down the selection of tenants for which to get a tenant, but does not change the configured value If true, the will ignore the access token in the cache and attempt to acquire new access token using the refresh token for the account if this one is available. This can be useful in the case when the application developer wants to make sure that conditional access policies are applies immediately, rather than after the expiration of the access token An containing the requested token can be thrown in the case where an interaction is required with the end user of the application, for instance, if no refresh token was in the cache, or the user needs to consents, or re-sign-in (for instance if the password expired), or performs two factor authentication The access token is considered a match if it contains at least all the requested scopes. This means that an access token with more scopes than requested could be returned as well. If the access token is expired or close to expiration (within 5 minute window), then the cached refresh token (if available) is used to acquire a new access token by making a silent network call. See https://aka.ms/msal-net-acquiretokensilent for more details Gets the Client ID (also known as Application ID) of the application as registered in the application registration portal (https://aka.ms/msal-net-register-app) and as passed in the constructor of the application. Represents confidential client applications - web apps, web APIs, daemon applications. Confidential client applications are typically applications which run on servers (web apps, web API, or even service/daemon applications). They are considered difficult to access, and therefore capable of keeping an application secret (hold configuration time secrets as these values would be difficult for end users to extract). A web app is the most common confidential client. The client ID is exposed through the web browser, but the secret is passed only in the back channel and never directly exposed. For details, see Client Applications. Application token cache which holds access tokens for this application. It's maintained and updated silently when calling On .NET Framework and .NET Core you can also customize the token cache serialization. See Token Cache Serialization. This is taken care of by MSAL.NET on other platforms. Acquires a token from the authority configured in the app using the authorization code previously received from the identity provider using the OAuth 2.0 authorization code flow. See Authorization Code Flow. This flow is usually used in web apps (for instance, ASP.NET and ASP.NET Core web apps) which sign-in users and can request an authorization code. This method does not look in the token cache, but stores the result in it. Before calling this method, use other methods such as to check the token cache. Scopes requested to access a protected API. The authorization code received from the service authorization endpoint. A builder enabling you to add optional parameters before executing the token request. Acquires a token from the authority configured in the app for the confidential client itself (not for a user) using the client credentials flow. See Client Credentials Flow. During this operation MSAL will first search in the cache for an unexpired token before acquiring a new one from Microsoft Entra ID. Scopes requested to access a protected API. For this flow (client credentials), the scopes should be in the form of "{ResourceIdUri/.default}" for instance https://management.azure.net/.default or, for Microsoft Graph, https://graph.microsoft.com/.default as the requested scopes are defined statically in the application registration in the portal, and cannot be overridden in the application. A builder enabling you to add optional parameters before executing the token request. Acquires an access token for this application (usually a web API) from the authority configured in the application, in order to access another downstream protected web API on behalf of a user using the OAuth 2.0 On-Behalf-Of flow. During this operation MSAL will first search in the cache for an unexpired token before acquiring a new one from Microsoft Entra ID. See On-Behalf-Of Flow. Scopes requested to access a protected API. Instance of containing credential information about the user on behalf of whom to get a token. A builder enabling you to add optional parameters before executing the token request. Pass an access token (not an ID token) which was used to access this application in the userAssertion parameter. For long-running or background processes in web API, see Long-running OBO in MSAL.NET. Computes the URL of the authorization request letting the user sign-in and consent to the application accessing specific scopes in the user's name. The URL targets the /authorize endpoint of the authority configured in the application. Scopes requested to access a protected API. A builder enabling you to add optional parameters before executing the token request to get the URL of the authorization endpoint with the specified parameters. In confidential client apps use instead. Use in web apps and web APIs, and use a token cache serializer for better security and performance. See https://aka.ms/msal-net-cca-token-cache-serialization. Methods for long-running or background processes in web APIs. Acquires an access token for this web API from the authority configured in the application, in order to access another downstream protected web API on behalf of a user using the OAuth 2.0 On-Behalf-Of flow. See Long-running OBO in MSAL.NET. Pass an access token (not an ID token) which was used to call this confidential client application in the userToken parameter. Use to stop the long running process and remove the associated tokens from the cache. This method should be called once when the long-running session is started. Scopes requested to access a protected API. A JSON Web Token which was used to call this web API and contains the credential information about the user on behalf of whom to get a token. Key by which to look up the token in the cache. If null, it will be set to the assertion hash of the userToken by default. A builder enabling you to add other parameters before executing the token request. Retrieves an access token from the cache using the provided cache key that can be used to access another downstream protected web API on behalf of a user using the OAuth 2.0 On-Behalf-Of flow. See Long-running OBO in MSAL.NET. Use to stop the long running process and remove the associated tokens from the cache. This method should be called during the long-running session to retrieve the token from the cache. Scopes requested to access a protected API. Key by which to look up the token in the cache. A builder enabling you to add other parameters before executing the token request. The token cache does not contain a token with an OBO cache key that matches the . Component to be used with managed identity applications for Azure resources. Acquires token for a managed identity configured on Azure resource. See https://aka.ms/msal-net-managed-identity. resource requested to access the protected API. For this flow (managed identity), the resource should be of the form "{ResourceIdUri}" or {ResourceIdUri/.default} for instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default. A builder enabling you to add optional parameters before executing the token request You can also chain the following optional parameters: ADFS seems to support tenanted authorities, but the tenant ID is fixed so for all intents and purposes it remains constant Must be kept immutable Figures out the authority based on the authority from the config and the authority from the request, and optionally the homeAccountTenantId, which has an impact on AcquireTokenSilent The algorithm is: 1. If there is no request authority (i.e. no authority override), use the config authority. 1.1. For AAD, if the config authority is "common" etc, try to use the tenanted version with the home account tenant ID 2. If there is a request authority, try to use it. 2.1. If the request authority is not "common", then use it 2.2 If the request authority is "common", ignore it, and use 1.1 Special cases: - if the authority is not defined at the application level and the request level is not AAD, use the request authority - if the authority is defined at app level, and the request level authority of is of different type, throw an exception Changes the tenant ID of the authority, if the authority supports tenants. If not, throws exception. The new tenant ID Forces the change, even if the current tenant is not "common" or "organizations" or "consumers" This object is at REQUEST level. Translates CIAM authorities into a usable form. This is needed only until ESTS is updated to support the north star format North star format: https://idgciamdemo.ciamlogin.com Transformed format: https://idgciamdemo.ciamlogin.com/idgciamdemo.onmicrosoft.com Provides instance metadata across all authority types. Deals with metadata caching. Priority order of metadata providers: If user provided metadata via use it exclusively. Otherwise: 1. Static cache (this is populated from the network) 2. Well-known cache if all environments present in the token cache are known (this is hard-coded into MSAL) 3. Cache stored in token cache (Not currently implemented) 5. AAD discovery endpoint 6. If going to the network fails with an error different than "invalid_instance" (i.e.authority validation failed), use the well-known instance metadata entry for the given authority 7. On failure, use the authority itself(i.e.preferred cache = preferred network = aliases = configured_authority) Spec: https://identitydivision.visualstudio.com/DevEx/_git/AuthLibrariesApiReview?path=%2FInstance%20Discovery%20Caching%2Fdesktop_web_caching.md AAD performs authority validation by calling the instance metadata endpoint. This is a bit unfortunate, because instance metadata is used for aliasing, and authority validation is orthogonal to that. MSAL must figure out aliasing even if ValidateAuthority is set to false. Validates the authority. This is specific to each authority type. Gets the azure region and adds telemetry to the ApiEvents Returns null if region should not be used or cannot be discovered. Indicates where the region information came from. Indicates that the API .WithAzureRegion() was not used Auto-detection failed, fallback to global Auto-detected from MSAL's static cache Auto-detected from Env Variable Auto-detected from IMDS Indicates where the region information came from. Indicates that the API .WithAzureRegion() was not used Region provided by the user, matches auto detected region Region provided by the user, auto detection cannot be done Region provided by the user, does not match auto detected region Region autodetect requested and was successful Region autodetect requested but failed. Fallback to global For Android there are from: https://github.com/AzureAD/microsoft-authentication-library-common-for-android/blob/dev/common/src/main/java/com/microsoft/identity/common/internal/broker/BrokerResult.java If device auth is required but the broker is not enabled, AAD will signal this by returning an URL pointing to the broker app that needs to be installed. For platforms that do not support a broker The OID claim is a unique identifier (GUID) for the user object in Azure AD. Guest Users have different OID. This is a stable ID across all apps. IMPORTANT: There are rare cases where this is missing! Avoid using as it is not guaranteed non-null. Use instead. The sub claim is a unique identifier for user + app. When outside of a request, the normal logger (requestContext.Logger) is not available. This logger is at the app level - it is just not tied to a correlation ID. Encryption algorithm used, e.g. ES256 https://tools.ietf.org/html/rfc7515#section-4.1.1 The type of token e.g. JWT https://tools.ietf.org/html/rfc7519#section-5.1 Key ID, can be an X509 cert thumbprint. When used with a JWK, the "kid" value is used to match a JWK "kid" parameter value https://tools.ietf.org/html/rfc7515#section-4.1.4 MSAL Flavor: .NET or WinRT MSAL assembly version Version of the operating system. This will not be sent on WinRT Device model. This will not be sent on .NET This class adds additional query parameters or headers to the requests sent to STS. This can help us in collecting statistics and potentially on diagnostics. One and only one ApiEvent is associated with each request. This class is responsible for merging app level and request level parameters. Not all parameters need to be merged - app level parameters can be accessed via AppConfig property Authority is the URI used by MSAL for communication and storage During a request it can be updated: - with the preferred environment - with actual tenant Indicates if the user configured claims via .WithClaims. Not affected by Client Capabilities If user configured claims, request should bypass cache If set, MSAL should add the key / value pairs from the provider to the token endpoint instead of generating a client assertion User assertion is null when is called. User-provided cache key for long-running OBO flow. Handles requests that are non-interactive. Currently MSAL supports Integrated Windows Auth (IWA). This class decides the workflow of an interactive request. The business rules are: 1. If WithBroker is set to true 1.1. Attempt to invoke the broker and get the token 1.2. If this fails, e.g. if broker is not installed, the use a web view (goto 2) 2. Use a webview and get an auth code and look at the auth code 2.1. If the auth code has a special format, showing that a broker is needed then. Invoke the broker flow (step 1) with a broker installation URL 2.2. Otherwise exchange the auth code for tokens (normal authorize_code grant) Base class for all flows. Use by implementing and optionally calling protected helper methods such as SendTokenRequestAsync, which know how to use all params when making the request. Return a custom set of scopes to override the default MSAL logic of merging input scopes with reserved scopes (openid, profile etc.) Leave as is / return null otherwise Creates the region Details Handles requests that are non-interactive. Currently MSAL supports Integrated Windows Auth. Responsible for getting an auth code Fire and forget the fetch action on a background thread. Do not change to Task and do not await it. This logger does not contain a correlation ID and should be used only when the correlation ID is not available i.e. before a request exists For expensive logging messages (e.g. when the log message evaluates a variable), it is better to check the log level ahead of time so as not to evaluate the expensive message and then discard it. Extension methods for ILoggerAdapter This method is used to avoid string concatenation when the log level is not enabled. This method is used to avoid string concatenation when the log level is not enabled. This exception is thrown when Intune requires app protection policy. The information in this exception can be used by app to obtain the required enrollment ID from Mobile App Management (MAM) SDK. See https://aka.ms/msal-net-trueMAM UPN of the user Local account id Tenant ID of the App Authority URL Initializes a new instance of the exception class with a specified error code and error message. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Represents public client applications - desktop and mobile applications. Public client applications are not trusted to safely keep application secrets and therefore they can only access web APIs in the name of the authenticating user. See Client Applications. Unlike , public clients are unable to securely store secrets on a client device and as a result do not require the use of a client secret. The redirect URI needed for interactive authentication is automatically determined by the library. It does not need to be passed explicitly in the constructor. Depending on the authentication strategy (e.g., through the Web Account Manager, the Authenticator app, web browser, etc.), different redirect URIs will be used by MSAL. Redirect URIs must always be configured for the application in the Azure Portal. Tells if the application can use the system web browser, therefore enabling single-sign-on with web applications. By default, MSAL will try to use a system browser on the mobile platforms, if it is available. See our documentation for more details. On Windows, macOS, and Linux a system browser can always be used, except in cases where there is no UI (e.g., a SSH session). On Android, the browser must support tabs. Returns true if MSAL can use the system web browser. Acquires a token interactively for the specified scopes. Either a system browser, an embedded browser, or a broker will handle this request, depending on the version of .NET framework used and on configuration. For Microsoft Entra applications, a broker is recommended. See Windows Broker. This method does not look in the token cache, but stores the result in it. Before calling this method, use other methods such as to check the token cache. See Interactive Authentication. Scopes requested to access a protected API. A builder enabling you to add optional parameters before executing the token request. The user will be signed-in interactively and will consent to scopes, as well as perform a multi-factor authentication step if such a policy was enabled in the Azure AD tenant. Acquires a token on a device without a web browser by letting the user authenticate on another device. This method does not look in the token cache, but stores the result in it. Before calling this method, use other methods such as to check the token cache. The token acquisition is done in two steps: The method first acquires a device code from the authority and returns it to the caller via the . This callback takes care of interacting with the user to direct them to authenticate (i.e., to a specific URL, with a code). The method then proceeds to poll for the security token which is granted upon successful login by the user based on the device code information. See Device Code Flow. Scopes requested to access a protected API. Callback containing information to show the user about how to authenticate and enter the device code. A builder enabling you to add optional parameters before executing the token request. This API is no longer recommended and will be deprecated in future versions in favor of similar functionality via the Windows broker (WAM). WAM does not require any setup for desktop apps to login with the Windows account. Acquires a token non-interactively for the signed-in user in Windows via Integrated Windows Authentication. The account used in this overrides is pulled from the operating system as the current user principal name. This method does not look in the token cache, but stores the result in it. Before calling this method, use other methods such as to check the token cache. Scopes requested to access a protected API. A builder enabling you to add optional parameters before executing the token request. See our documentation for more details. Non-interactive request to acquire a token via username and password authentication. Scopes requested to access a protected API Identifier of the user application requests token on behalf. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com User password as a secure string. A builder enabling you to add optional parameters before executing the token request Available only for .NET Framework and .NET Core applications. See our documentation for details. .NET no longer recommends using SecureString and MSAL puts the plaintext value of the password on the wire, as required by the OAuth protocol. See SecureString documentation for details. Acquires a token without user interaction using username and password authentication. This method does not look in the token cache, but stores the result in it. Before calling this method, use other methods such as to check the token cache. Scopes requested to access a protected API. Identifier of the user application requests token on behalf. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com User password as a string. A builder enabling you to add optional parameters before executing the token request. Available only for .NET Framework and .NET Core applications. See our documentation for details. Interactive request to acquire token for the specified scopes. The user is required to select an account Scopes requested to access a protected API Authentication result containing a token for the requested scopes and account The user will be signed-in interactively if needed, and will consent to scopes and do multi-factor authentication if such a policy was enabled in the Azure AD tenant. Interactive request to acquire token for the specified scopes. The user will need to sign-in but an account will be proposed based on the Scopes requested to access a protected API Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Authentication result containing a token for the requested scopes and account Interactive request to acquire token for the specified scopes. The user will need to sign-in but an account will be proposed based on the provided Scopes requested to access a protected API Account to use for the interactive token acquisition. See for ways to get an account Authentication result containing a token for the requested scopes and account Interactive request to acquire token for a login with control of the UI behavior and possibility of passing extra query parameters like additional claims Scopes requested to access a protected API Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Authentication result containing a token for the requested scopes and account Interactive request to acquire token for an account with control of the UI behavior and possibility of passing extra query parameters like additional claims Scopes requested to access a protected API Account to use for the interactive token acquisition. See for ways to get an account Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Authentication result containing a token for the requested scopes and account Interactive request to acquire token for a given login, with the possibility of controlling the user experience, passing extra query parameters, providing extra scopes that the user can pre-consent to, and overriding the authority pre-configured in the application scopes requested to access a protected API Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. scopes that you can request the end user to consent upfront, in addition to the scopes for the protected web API for which you want to acquire a security token. Specific authority for which the token is requested. Passing a different value than configured does not change the configured value Authentication result containing a token for the requested scopes and account Interactive request to acquire token for a given account, with the possibility of controlling the user experience, passing extra query parameters, providing extra scopes that the user can pre-consent to, and overriding the authority pre-configured in the application Scopes requested to access a protected API Account to use for the interactive token acquisition. See for ways to get an account Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Scopes that you can request the end user to consent upfront, in addition to the scopes for the protected web API for which you want to acquire a security token. Specific authority for which the token is requested. Passing a different value than configured does not change the configured value Authentication result containing a token for the requested scopes and account Interactive request to acquire token for the specified scopes. The interactive window will be parented to the specified window. The user will be required to select an account Scopes requested to access a protected API Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and account The user will be signed-in interactively if needed, and will consent to scopes and do multi-factor authentication if such a policy was enabled in the Azure AD tenant. Interactive request to acquire token for the specified scopes. The interactive window will be parented to the specified window. . The user will need to sign-in but an account will be proposed based on the Scopes requested to access a protected API Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and login Interactive request to acquire token for the specified scopes. The user will need to sign-in but an account will be proposed based on the provided Scopes requested to access a protected API Account to use for the interactive token acquisition. See for ways to get an account Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and account Interactive request to acquire token for a login with control of the UI behavior and possibility of passing extra query parameters like additional claims Scopes requested to access a protected API Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and account Interactive request to acquire token for an account with control of the UI behavior and possibility of passing extra query parameters like additional claims Scopes requested to access a protected API Account to use for the interactive token acquisition. See for ways to get an account Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and account Interactive request to acquire token for a given login, with the possibility of controlling the user experience, passing extra query parameters, providing extra scopes that the user can pre-consent to, and overriding the authority pre-configured in the application Scopes requested to access a protected API Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Scopes that you can request the end user to consent upfront, in addition to the scopes for the protected web API for which you want to acquire a security token. Specific authority for which the token is requested. Passing a different value than configured does not change the configured value Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and account Interactive request to acquire token for a given account, with the possibility of controlling the user experience, passing extra query parameters, providing extra scopes that the user can pre-consent to, and overriding the authority pre-configured in the application Scopes requested to access a protected API Account to use for the interactive token acquisition. See for ways to get an account Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Scopes that you can request the end user to consent upfront, in addition to the scopes for the protected web API for which you want to acquire a security token. Specific authority for which the token is requested. Passing a different value than configured does not change the configured value Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and account Non-interactive request to acquire a security token from the authority, via Username/Password Authentication. See https://aka.ms/msal-net-up. Scopes requested to access a protected API Identifier of the user application requests token on behalf. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com User password. Authentication result containing a token for the requested scopes and account Acquires a security token on a device without a web browser, by letting the user authenticate on another device. This is done in two steps: the method first acquires a device code from the authority and returns it to the caller via the . This callback takes care of interacting with the user to direct them to authenticate (to a specific URL, with a code) The method then proceeds to poll for the security token which is granted upon successful login by the user based on the device code information See https://aka.ms/msal-device-code-flow. Scopes requested to access a protected API Callback containing information to show the user about how to authenticate and enter the device code. Authentication result containing a token for the requested scopes and for the user who has authenticated on another device with the code Acquires a security token on a device without a web browser, by letting the user authenticate on another device, with possibility of passing extra parameters. This is done in two steps: the method first acquires a device code from the authority and returns it to the caller via the . This callback takes care of interacting with the user to direct them to authenticate (to a specific URL, with a code) The method then proceeds to poll for the security token which is granted upon successful login by the user based on the device code information See https://aka.ms/msal-device-code-flow. Scopes requested to access a protected API This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Callback containing information to show the user about how to authenticate and enter the device code. Authentication result containing a token for the requested scopes and for the user who has authenticated on another device with the code Acquires a security token on a device without a web browser, by letting the user authenticate on another device, with possibility of cancelling the token acquisition before it times out. This is done in two steps: the method first acquires a device code from the authority and returns it to the caller via the . This callback takes care of interacting with the user to direct them to authenticate (to a specific URL, with a code) The method then proceeds to poll for the security token which is granted upon successful login by the user based on the device code information. This step is cancelable See https://aka.ms/msal-device-code-flow. Scopes requested to access a protected API The callback containing information to show the user about how to authenticate and enter the device code. A CancellationToken which can be triggered to cancel the operation in progress. Authentication result containing a token for the requested scopes and for the user who has authenticated on another device with the code Acquires a security token on a device without a web browser, by letting the user authenticate on another device, with possibility of passing extra query parameters and cancelling the token acquisition before it times out. This is done in two steps: the method first acquires a device code from the authority and returns it to the caller via the . This callback takes care of interacting with the user to direct them to authenticate (to a specific URL, with a code) The method then proceeds to poll for the security token which is granted upon successful login by the user based on the device code information. This step is cancelable See https://aka.ms/msal-device-code-flow. Scopes requested to access a protected API This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. The callback containing information to show the user about how to authenticate and enter the device code. A CancellationToken which can be triggered to cancel the operation in progress. Authentication result containing a token for the requested scopes and for the user who has authenticated on another device with the code Non-interactive request to acquire a security token for the signed-in user in Windows, via Integrated Windows Authentication. See https://aka.ms/msal-net-iwa. The account used in this overrides is pulled from the operating system as the current user principal name On Windows Universal Platform, the following capabilities need to be provided: Enterprise Authentication, Private Networks (Client and Server), User Account Information Scopes requested to access a protected API Authentication result containing a token for the requested scopes and for the currently signed-in user in Windows Non-interactive request to acquire a security token for the signed-in user in Windows, via Integrated Windows Authentication. See https://aka.ms/msal-net-iwa. The account used in this overrides is pulled from the operating system as the current user principal name Scopes requested to access a protected API Identifier of the user account for which to acquire a token with Integrated Windows authentication. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Authentication result containing a token for the requested scopes and for the currently signed-in user in Windows Xamarin iOS specific property enabling the application to share the token cache with other applications sharing the same keychain security group. If you use this property, you MUST add the capability to your Application Entitlement. When using this property, the value must contain the TeamId prefix, which is why this is now obsolete. Xamarin iOS specific property enabling the application to share the token cache with other applications sharing the same keychain security group. If you use this property, you MUST add the capability to your Application Entitlement. In this property, the value should not contain the TeamId prefix, MSAL will resolve the TeamId at runtime. For more details, please see https://aka.ms/msal-net-sharing-cache-on-ios This API may change in future release. Notification for certain token cache interactions during token acquisition. This delegate is used in particular to provide a custom token cache serialization. See https://aka.ms/aka.ms/msal-net-token-cache-serialization Arguments related to the cache item impacted This is the interface that implements the public access to cache operations. With CacheV2, this should only be necessary if the caller is persisting the cache in their own store, since this will provide the serialize/deserialize and before/after notifications used in that scenario. See https://aka.ms/aka.ms/msal-net-token-cache-serialization Sets a delegate to be notified before any library method accesses the cache. This gives an option to the delegate to deserialize a cache entry for the application and accounts specified in the . See https://aka.ms/msal-net-token-cache-serialization. If you need async/task-based callbacks, please use SetBeforeAccessAsync instead. Delegate set in order to handle the cache deserialization When the delegate is used to deserialize the cache, it might want to call Sets a delegate to be notified after any library method accesses the cache. This gives an option to the delegate to serialize a cache entry for the application and accounts specified in the . See https://aka.ms/msal-net-token-cache-serialization. If you need async/task-based callbacks, please use SetAfterAccessAsync instead. Delegate set in order to handle the cache serialization in the case where the member of the cache is true In the case where the delegate is used to serialize the cache entirely (not just a row), it might want to call Sets a delegate called before any library method writes to the cache. This gives an option to the delegate to reload the cache state from a row in database and lock that row. That database row can then be unlocked in the delegate registered with If you need async/task-based callbacks, please use SetBeforeWriteAsync instead. Delegate set in order to prepare the cache serialization Sets a delegate to be notified before any library method accesses the cache. This gives an option to the delegate to deserialize a cache entry for the application and accounts specified in the . See https://aka.ms/msal-net-token-cache-serialization. This provides the same functionality as SetBeforeAccess but it provides for an async/task-based callback. Delegate set in order to handle the cache deserialization In the case where the delegate is used to deserialize the cache, it might want to call Sets a delegate to be notified after any library method accesses the cache. This gives an option to the delegate to serialize a cache entry for the application and accounts specified in the . See https://aka.ms/msal-net-token-cache-serialization. This provides the same functionality as SetAfterAccess but it provides for an async/task-based callback. Delegate set in order to handle the cache serialization in the case where the member of the cache is true In the case where the delegate is used to serialize the cache entirely (not just a row), it might want to call Sets a delegate called before any library method writes to the cache. This gives an option to the delegate to reload the cache state from a row in database and lock that row. That database row can then be unlocked in the delegate registered with This provides the same functionality as SetBeforeWrite but it provides for an async/task-based callback. Delegate set in order to prepare the cache serialization Functionality replaced by and is accessible in TokenCacheNotificationArgs. Byte stream representation of the cache This is the recommended format for maintaining SSO state between applications. / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Functionality replaced by and is accessible in TokenCacheNotificationArgs. Byte stream representation of the cache Set to true to clear MSAL cache contents. Defaults to false. You would want to set this to true if you want the cache contents in memory to be exactly what's on disk. You would want to set this to false if you want to merge the contents of what's on disk with your current in memory state. This is the recommended format for maintaining SSO state between applications. / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Functionality replaced by and is accessible in TokenCacheNotificationArgs. Byte stream representation of the cache / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Functionality replaced by and is accessible in TokenCacheNotificationArgs. Byte stream representation of the cache / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Functionality replaced by and is accessible in TokenCacheNotificationArgs. Byte stream representation of the cache / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Functionality replaced by and is accessible in TokenCacheNotificationArgs. See https://aka.ms/msal-net-4x-cache-breaking-change Byte stream representation of the cache / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Functionality replaced by . See https://aka.ms/msal-net-4x-cache-breaking-change /// Functionality replaced by . See https://aka.ms/msal-net-4x-cache-breaking-change /// Functionality replaced by and See https://aka.ms/msal-net-4x-cache-breaking-change Functionality replaced by and See https://aka.ms/msal-net-4x-cache-breaking-change Returns a RT for the request. If familyId is specified, it tries to return the FRT. FOCI - check in the app metadata to see if the app is part of the family null if unknown, true or false if app metadata has details Shows if MSAL's in-memory token cache has any kind of RT or non-expired AT. Does not trigger a cache notification. Ignores ADAL's cache. True when MSAL has been configured to fire the serialization events i.e. external token caching is enabled. This interface will be available in TokenCacheNotificationArgs callback to enable serialization/deserialization of the cache. The methods in this class are not thread safe. It is expected that they will be called from the token cache callbacks, registered via SetBeforeAccess, SetAfterAccess. These callbacks thread safe because they are triggered sequentially. Serializes the token cache to the MSAL.NET 3.x cache format, which is compatible with other MSAL desktop libraries, including MSAL.NET 4.x, MSAL for Python and MSAL for Java. If you need to maintain SSO between an application using ADAL 3.x and this application using MSAL 3.x or later, you might also want to serialize and deserialize with /, otherwise just use /. Byte stream representation of the cache This is the recommended format for maintaining SSO state between applications. / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Deserializes the token cache to the MSAL.NET 3.x cache format, which is compatible with other MSAL desktop libraries, including MSAL.NET 4.x, MSAL for Python and MSAL for Java. If you need to maintain SSO between an application using ADAL 3.x and this application using MSAL 3.x or later, you might also want to serialize and deserialize with /, otherwise just use /. Byte stream representation of the cache Set to true to clear MSAL cache contents. Defaults to false. You would want to set this to true if you want the cache contents in memory to be exactly what's on disk. You would want to set this to false if you want to merge the contents of what's on disk with your current in memory state. This is the recommended format for maintaining SSO state between applications. / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Serializes a part of the token cache - the refresh tokens - to the ADAL.NET 3.x cache format. If you need to maintain SSO between an application using ADAL 3.x and this application using MSAL 3.x or later, use / in addition to /. See https://aka.ms/adal-to-msal-net/cache for details on how to use this advanced API correctly. Byte stream representation of the cache Do not use / without also using /, because only refresh tokens are exported in this format. Your applications will not cache access token and id tokens, and will instead need to get them from the identity provider (AAD), which will eventually throttle you. Later versions of ADAL (4.x and 5.x) use the same cache format as MSAL. Only / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. ADAL to MSAL cache interop is only available for public client scenarios and for web site scenario. Deserializes a part of the token cache - the refresh tokens - to the ADAL.NET 3.x cache format. This API should only be used to maintain SSO between an application using ADAL 3.x and this application using MSAL 3.x or later. Use / in addition to /. See https://aka.ms/adal-to-msal-net/cache for details on how to use this advanced API correctly. Byte stream representation of the cache Do not use / without also using /, because only refresh tokens are exported in this format. Your applications will not cache access token and id tokens, and will instead need to get them from the identity provider (AAD), which will eventually throttle you. Later versions of ADAL (4.x and 5.x) use the same cache format as MSAL. Only / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. ADAL to MSAL cache interop is only available for public client scenarios and for web site scenario. Serializes the token cache to the MSAL.NET 2.x unified cache format, which is compatible with ADAL.NET v4 and other MSAL.NET v2 applications. If you need to maintain SSO between an application using ADAL 3.x or MSAL 2.x and this application using MSAL 3.x, you might also want to serialize and deserialize with / or /, otherwise just use /. Byte stream representation of the cache / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Deserializes the token cache to the MSAL.NET 2.x cache format, which is compatible with ADAL.NET v4 and other MSAL.NET v2 applications. If you need to maintain SSO between an application using ADAL 3.x or MSAL 2.x and this application using MSAL 3.x, you might also want to serialize and deserialize with / or /, otherwise just use /. Byte stream representation of the cache / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. The Kerberos key types used in this assembly. None. dec-cbc-crc ([RFC3961] section 6.2.3) des-cbc-md5 ([RFC3961] section 6.2.1) aes128-cts-hmac-sha1-96 ([RFC3962] section 6) aes256-cts-hmac-sha1-96 ([RFC3962] section 6) Class for Kerberos tickets that are included as claims and used as a supplemental token in an OAuth/OIDC protocol response. Get or Sets the client key used to encrypt the client portion of the ticket. This is optional. This will be null if KeyType is null. This MUST be protected in the protocol response. Get or Sets the client key type.This is optional.This will be null if ClientKey is null. Get or Sets the Base64 encoded KERB_MESSAGE_BUFFER Get or Sets the error message that server encountered when creating a ticket granting ticket. Get or Sets the Kerberos realm/domain name. Get or Sets the target service principal name (SPN). Get or Sets the client name. Depending on the ticket, this can be either a UserPrincipalName or SamAccountName. Creates a new instance of class. Creates a new instance of class with error message. Error message to be set. Creates a string representation of the data captured in the Kerberos supplemental ticket. A string containing the realm, service principal name, client name, and key type. Helper class to manage Kerberos Ticket Claims. Creates a object from given ID token string.. ID token string. A object if a Kerberos Ticket Claim exists in the given idToken parameter and is parsed correctly. Null, otherwise. Save current Kerberos Ticket to current user's Ticket Cache. Kerberos ticket object to save. Throws when given ticket parameter is not a valid Kerberos supplemental ticket. Throws if error occurs while saving ticket information into Ticket Cache. Save current Kerberos Ticket to current user's Ticket Cache. Windows only. Kerberos ticket object to save. The Logon Id of the user owning the ticket cache. The default of 0 represents the currently logged on user. Throws when given ticket parameter is not a valid Kerberos supplemental ticket. Throws if error occurs while saving ticket information into Ticket Cache. Reads a Kerberos Service Ticket associated with given service principal name from current user's Ticket Cache. Windows only. Service principal name to find associated Kerberos Ticket. Byte stream of searched Kerberos Ticket information if exists. Null, otherwise. Throws if error occurs while searching ticket information from Ticket Cache. Reads a Kerberos Service Ticket associated with given service principal name from current user's Ticket Cache. Service principal name to find associated Kerberos Ticket. The Logon Id of the user owning the ticket cache. The default of 0 represents the currently logged on user. Byte stream of searched Kerberos Ticket information if exists. Null, otherwise. Throws if error occurs while searching ticket information from Ticket Cache. Gets the KRB-CRED Kerberos Ticket information as byte stream. Kerberos ticket object to save. Byte stream representation of KRB-CRED Kerberos Ticket if it contains valid ticket information. Null, otherwise. Generate a Kerberos Ticket Claim string. Service principal name to use. Ticket container to use. A Kerberos Ticket Claim string if valid service principal name was given. Empty string, otherwise. Declares the type of container to use for Kerberos Ticket Claim. Use the Id token as the Kerberos Ticket container. (NOTE) MSAL will read out Kerberos Service Ticket from received id token, cache into current user's ticket cache, and return it as KerberosSupplementalTicket object in AuthenticationResult. Use the Access Token as the Kerberos Ticket container. (NOTE) MSAL will not read out Kerberos Service Ticket from received access token. Caller should handle received access token directly to use for next service request. Callback delegate that allows application developers to consume logs, and handle them in a custom manner. This callback is set using . If PiiLoggingEnabled is set to true, when registering the callback this method will receive the messages twice: once with the containsPii parameter equals false and the message without PII, and a second time with the containsPii parameter equals to true and the message might contain PII. In some cases (when the message does not contain PII), the message will be the same. For details see https://aka.ms/msal-net-logging Log level of the log message to process Pre-formatted log message Indicates if the log message contains Organizational Identifiable Information (OII) or Personally Identifiable Information (PII) nor not. If is set to false then this value is always false. Otherwise it will be true when the message contains PII. Represents log level in MSAL. For details, see MSAL logging. Includes logs of important health metrics to help with diagnostics of MSAL operations. Includes logs when something has gone wrong and an error was generated. Used for debugging and identifying problems. Includes logs in scenarios when there hasn't necessarily been an error or failure, but are intended for diagnostics and pinpointing problems. Default. Includes logs of general events intended for informational purposes, not necessarily intended for debugging. Includes logs of the full details of library behavior. Class to be used for managed identity applications (on Azure resources like App Services, Virtual Machines, Azure Arc, Service Fabric and Cloud Shell). Managed identity can be enabled on Azure resources as a system assigned managed identity or a user assigned managed identity. Detects and returns the managed identity source available on the environment. Managed identity source detected on the environment if any. Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ManagedIdentitySource.cs Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AppServiceManagedIdentitySource.cs Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/AzureArcManagedIdentitySource.cs Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/CloudShellManagedIdentitySource.cs Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ImdsManagedIdentitySource.cs Class to initialize a managed identity and identify the service. Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ManagedIdentityClient.cs The requested access token. When you call a secured REST API, the token is embedded in the Authorization request header field as a "bearer" token, allowing the API to authenticate the caller. The timespan when the access token expires. The date is represented as the number of seconds from "1970-01-01T0:0:0Z UTC" (corresponds to the token's exp claim). The resource the access token was requested for. Which matches the resource query string parameter of the request. The type of token returned by the Managed Identity endpoint. which is a "Bearer" access token, which means the resource can give access to the bearer of this token. A unique identifier generated by Azure AD for the Azure Resource. The Client ID is a GUID value that uniquely identifies the application and its configuration within the identity platform Managed identity sources supported. The library will handle these internally. Default. The source to acquire token for managed identity is IMDS. The source to acquire token for managed identity is App Service. The source to acquire token for managed identity is Azure Arc. The source to acquire token for managed identity is Cloud Shell. The source to acquire token for managed identity is Service Fabric. Indicates that the source is defaulted to IMDS since no environment variables are set. This is used to detect the managed identity source. Original source of code: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/ServiceFabricManagedIdentitySource.cs MSAL-wide metrics. Total tokens obtained by MSAL from the identity provider. Total tokens obtained by MSAL from cache. Total tokens obtained by MSAL from broker. Total time, in milliseconds, spent in MSAL for all requests. Aggregate of . In MSAL.NET 1.x, was representing a User. From MSAL 2.x use which represents an account (a user has several accounts). See https://aka.ms/msal-net-2-released for more details. In MSAL.NET 1.x was the displayable ID of a user. From MSAL 2.x use the of an account. See https://aka.ms/msal-net-2-released for more details In MSAL.NET 1.x was the name of the user (which was not very useful as the concatenation of some claims). From MSAL 2.x rather use . See https://aka.ms/msal-net-2-released for more details. In MSAL.NET 1.x was the URL of the identity provider (e.g. `https://login.microsoftonline.com/tenantId`). From MSAL.NET 2.x use which retrieves the host only (e.g. login.microsoftonline.com). See https://aka.ms/msal-net-2-released for more details. In MSAL.NET 1.x was an identifier for the user in the guest tenant. From MSAL.NET 2.x, use to get the user identifier (globally unique across tenants). See https://aka.ms/msal-net-2-released for more details. Contains parameters used by the MSAL call accessing the cache. See also which contains methods to customize the cache serialization. For more details about the token cache see https://aka.ms/msal-net-web-token-cache In MSAL.NET 1.x, returned the user who signed in to get the authentication result. From MSAL 2.x rather use instead. See https://aka.ms/msal-net-2-released for more details. This constructor is for test purposes only. It allows apps to unit test their MSAL token cache implementation code. This constructor is for test purposes only. It allows apps to unit test their MSAL token cache implementation code. This constructor is for test purposes only. It allows apps to unit test their MSAL token cache implementation code. This constructor is for test purposes only. It allows apps to unit test their MSAL token cache implementation code. Gets the involved in the transaction objects implement this interface. Gets the ClientId (application ID) of the application involved in the cache transaction Gets the account involved in the cache transaction. Indicates whether the state of the cache has changed, for example when tokens are being added or removed. Not all cache operations modify the state of the cache. Indicates whether the cache change occurred in the UserTokenCache or in the AppTokenCache. The Application Cache is used in Client Credential grant, which is not available on all platforms. See https://aka.ms/msal-net-app-cache-serialization for details. A suggested token cache key, which can be used with general purpose storage mechanisms that allow storing key-value pairs and key based retrieval. Useful in applications that store one token cache per user, the recommended pattern for web apps. The value is: homeAccountId for AcquireTokenSilent, GetAccount(homeAccountId), RemoveAccount and when writing tokens on confidential client calls "{clientId}__AppTokenCache" for AcquireTokenForClient "{clientId}_{tenantId}_AppTokenCache" for AcquireTokenForClient when using a tenant specific authority the hash of the original token for AcquireTokenOnBehalfOf Is true when at least one non-expired access token exists in the cache. If this flag is false in the OnAfterAccessAsync notification - the node can be deleted from the underlying storage (e.g. IDistributedCache). MSAL takes into consideration access tokens expiration when computing this flag. Use in conjunction with SuggestedCacheExpiry. If a refresh token exists in the cache, this property will always be true. The cancellation token that was passed to AcquireToken* flow via ExecuteAsync(CancellationToken). Can be passed along to the custom token cache implementation. The correlation id associated with the request. See Scopes specified in the AcquireToken* method. Note that Azure Active Directory may return more scopes than requested, however this property will only contain the scopes requested. Tenant Id specified in the AcquireToken* method, if any. Note that if "common" or "organizations" is specified, Azure Active Directory discovers the host tenant for the user, and the tokens are associated with it. This property is not impacted. Suggested value of the expiry, to help determining the cache eviction time. This value is only set on the OnAfterAccess delegate, on a cache write operation (that is when args.HasStateChanged is true) and when the cache node contains only access tokens. In all other cases it's null. Identity Logger provided at the time of application creation Via WithLogging(IIdentityLogger, bool)/> Calling the log function will automatically add MSAL formatting to the message. For details see https://aka.ms/msal-net-logging Boolean used to determine if Personally Identifiable Information (PII) logging is enabled. Cache Details contains the details of L1/ L2 cache for telemetry logging. Xamarin iOS specific property enabling the application to share the token cache with other applications sharing the same keychain security group. If you use this property, you MUST add the capability to your Application Entitlement. When using this property, the value must contain the TeamId prefix, which is why this is now obsolete. Constructor of the application. It will use `https://login.microsoftonline.com/common` as the default authority. Client ID (also known as App ID) of the application as registered in the application registration portal (https://aka.ms/msal-net-register-app)/. REQUIRED Constructor of the application. Client ID (also named Application ID) of the application as registered in the application registration portal (https://aka.ms/msal-net-register-app)/. REQUIRED Authority of the security token service (STS) from which MSAL.NET will acquire the tokens. Usual authorities are: https://login.microsoftonline.com/tenant/, where tenant is the tenant ID of the Azure AD tenant or a domain associated with this Azure AD tenant, in order to sign-in user of a specific organization only https://login.microsoftonline.com/common/ to signing users with any work and school accounts or Microsoft personal account https://login.microsoftonline.com/organizations/ to signing users with any work and school accounts https://login.microsoftonline.com/consumers/ to signing users with only personal Microsoft account (live) Note that this setting needs to be consistent with what is declared in the application registration portal Interactive request to acquire token for the specified scopes. The user is required to select an account Scopes requested to access a protected API Authentication result containing a token for the requested scopes and account The user will be signed-in interactively if needed, and will consent to scopes and do multi-factor authentication if such a policy was enabled in the Azure AD tenant. Interactive request to acquire token for the specified scopes. The user will need to sign-in but an account will be proposed based on the Scopes requested to access a protected API Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Authentication result containing a token for the requested scopes and account Interactive request to acquire token for the specified scopes. The user will need to sign-in but an account will be proposed based on the provided Scopes requested to access a protected API Account to use for the interactive token acquisition. See for ways to get an account Authentication result containing a token for the requested scopes and account Interactive request to acquire token for a login with control of the UI prompt and possibility of passing extra query parameters like additional claims Scopes requested to access a protected API Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Authentication result containing a token for the requested scopes and account Interactive request to acquire token for an account with control of the UI prompt and possibility of passing extra query parameters like additional claims Scopes requested to access a protected API Account to use for the interactive token acquisition. See for ways to get an account Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Authentication result containing a token for the requested scopes and account Interactive request to acquire token for a given login, with the possibility of controlling the user experience, passing extra query parameters, providing extra scopes that the user can pre-consent to, and overriding the authority pre-configured in the application Scopes requested to access a protected API Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Scopes that you can request the end user to consent upfront, in addition to the scopes for the protected web API for which you want to acquire a security token. Specific authority for which the token is requested. Passing a different value than configured does not change the configured value Authentication result containing a token for the requested scopes and account Interactive request to acquire token for a given account, with the possibility of controlling the user experience, passing extra query parameters, providing extra scopes that the user can pre-consent to, and overriding the authority pre-configured in the application Scopes requested to access a protected API Account to use for the interactive token acquisition. See for ways to get an account Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Scopes that you can request the end user to consent upfront, in addition to the scopes for the protected web API for which you want to acquire a security token. Specific authority for which the token is requested. Passing a different value than configured does not change the configured value Authentication result containing a token for the requested scopes and account Interactive request to acquire token for the specified scopes. The interactive window will be parented to the specified window. The user will be required to select an account Scopes requested to access a protected API Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and account The user will be signed-in interactively if needed, and will consent to scopes and do multi-factor authentication if such a policy was enabled in the Azure AD tenant. Interactive request to acquire token for the specified scopes. The interactive window will be parented to the specified window. The user will need to sign-in but an account will be proposed based on the Scopes requested to access a protected API Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and login Interactive request to acquire token for the specified scopes. The user will need to sign-in but an account will be proposed based on the provided Scopes requested to access a protected API Account to use for the interactive token acquisition. See for ways to get an account Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and account Interactive request to acquire token for a login with control of the UI prompt and possibility of passing extra query parameters like additional claims Scopes requested to access a protected API Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and account Interactive request to acquire token for an account with control of the UI prompt and possibility of passing extra query parameters like additional claims Scopes requested to access a protected API Account to use for the interactive token acquisition. See for ways to get an account Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and account Interactive request to acquire token for a given login, with the possibility of controlling the user experience, passing extra query parameters, providing extra scopes that the user can pre-consent to, and overriding the authority pre-configured in the application Scopes requested to access a protected API Identifier of the user. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. scopes that you can request the end user to consent upfront, in addition to the scopes for the protected web API for which you want to acquire a security token. Specific authority for which the token is requested. Passing a different value than configured does not change the configured value Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and account Interactive request to acquire token for a given account, with the possibility of controlling the user experience, passing extra query parameters, providing extra scopes that the user can pre-consent to, and overriding the authority pre-configured in the application Scopes requested to access a protected API Account to use for the interactive token acquisition. See for ways to get an account Designed interactive experience for the user. This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. scopes that you can request the end user to consent upfront, in addition to the scopes for the protected web API for which you want to acquire a security token. Specific authority for which the token is requested. Passing a different value than configured does not change the configured value Object containing a reference to the parent window/activity. REQUIRED for Xamarin.Android only. Authentication result containing a token for the requested scopes and account Non-interactive request to acquire a security token from the authority, via Username/Password Authentication. Available only on .net desktop and .net core. See https://aka.ms/msal-net-up for details. Scopes requested to access a protected API Identifier of the user application requests token on behalf. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com User password. Authentication result containing a token for the requested scopes and account Acquires a security token on a device without a web browser, by letting the user authenticate on another device. This is done in two steps: the method first acquires a device code from the authority and returns it to the caller via the . This callback takes care of interacting with the user to direct them to authenticate (to a specific URL, with a code) The method then proceeds to poll for the security token which is granted upon successful login by the user based on the device code information See https://aka.ms/msal-device-code-flow. Scopes requested to access a protected API Callback containing information to show the user about how to authenticate and enter the device code. Authentication result containing a token for the requested scopes and for the user who has authenticated on another device with the code Acquires a security token on a device without a web browser, by letting the user authenticate on another device, with possibility of passing extra parameters. This is done in two steps: the method first acquires a device code from the authority and returns it to the caller via the . This callback takes care of interacting with the user to direct them to authenticate (to a specific URL, with a code) The method then proceeds to poll for the security token which is granted upon successful login by the user based on the device code information See https://aka.ms/msal-device-code-flow. Scopes requested to access a protected API This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. Callback containing information to show the user about how to authenticate and enter the device code. Authentication result containing a token for the requested scopes and for the user who has authenticated on another device with the code Acquires a security token on a device without a web browser, by letting the user authenticate on another device, with possibility of cancelling the token acquisition before it times out. This is done in two steps: the method first acquires a device code from the authority and returns it to the caller via the . This callback takes care of interacting with the user to direct them to authenticate (to a specific URL, with a code) The method then proceeds to poll for the security token which is granted upon successful login by the user based on the device code information. This step is cancelable See https://aka.ms/msal-device-code-flow. Scopes requested to access a protected API The callback containing information to show the user about how to authenticate and enter the device code. A CancellationToken which can be triggered to cancel the operation in progress. Authentication result containing a token for the requested scopes and for the user who has authenticated on another device with the code Acquires a security token on a device without a web browser, by letting the user authenticate on another device, with possibility of passing extra query parameters and cancelling the token acquisition before it times out. This is done in two steps: the method first acquires a device code from the authority and returns it to the caller via the . This callback takes care of interacting with the user to direct them to authenticate (to a specific URL, with a code) The method then proceeds to poll for the security token which is granted upon successful login by the user based on the device code information. This step is cancelable See https://aka.ms/msal-device-code-flow. Scopes requested to access a protected API This parameter will be appended as is to the query string in the HTTP authentication request to the authority. This is expected to be a string of segments of the form key=value separated by an ampersand character. The parameter can be null. The callback containing information to show the user about how to authenticate and enter the device code. A CancellationToken which can be triggered to cancel the operation in progress. Authentication result containing a token for the requested scopes and for the user who has authenticated on another device with the code Acquires an access token from an existing refresh token and stores it and the refresh token into the application user token cache, where it will be available for further AcquireTokenSilentAsync calls. This method can be used in migration to MSAL from ADAL v2 and in various integration scenarios where you have a RefreshToken available. (see https://aka.ms/msal-net-migration-adal2-msal2) Scope to request from the token endpoint. Setting this to null or empty will request an access token, refresh token and ID token with default scopes The refresh token (for example previously obtained from ADAL 2.x) Non-interactive request to acquire a security token for the signed-in user in Windows, via Integrated Windows Authentication. See https://aka.ms/msal-net-iwa. The account used in this overrides is pulled from the operating system as the current user principal name On Windows Universal Platform, the following capabilities need to be provided: Enterprise Authentication, Private Networks (Client and Server), User Account Information Supported on .net desktop Scopes requested to access a protected API Authentication result containing a token for the requested scopes and for the currently signed-in user in Windows Non-interactive request to acquire a security token for the signed-in user in Windows, via Integrated Windows Authentication. See https://aka.ms/msal-net-iwa. The account used in this overrides is pulled from the operating system as the current user principal name Scopes requested to access a protected API Identifier of the user account for which to acquire a token with Integrated Windows authentication. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com Authentication result containing a token for the requested scopes and for the currently signed-in user in Windows Constructor to create application instance. This constructor is only available for Desktop and NetCore apps Client id of the application Default authority to be used for the application Instance of TokenCache. A special account value that indicates that the current operating system account should be used to log the user in. Not all operating systems and authentication flows support this concept, in which case calling will throw an . Currently only the Windows broker is able to login with the current operating system user. For additional details, see the documentation on the Windows broker. Returns true if MSAL can use an embedded web view (web browser). All .NET Framework applications will use the legacy web view. .NET 6 and .NET Core applications must use the Microsoft.Identity.Client.Desktop package with WebView2. .NET 6 for Windows comes with WebView2 by default. WebView2 UI is only shown for non-AAD authorities. Refer to our documentation for additional details. Returns false when the application runs in headless mode (e.g., when SSH-d into a Linux machine). Browsers (web views) and brokers cannot be used if there is no UI support. For those scenarios, use . Returns true if an authentication broker can be used. This method is only needed for mobile scenarios which support Mobile Application Management (MAM). In other cases, use WithBroker, which will fall back to use a browser if an authentication broker is unavailable. On Windows, the broker (WAM) can be used on Windows 10 and is always installed. See https://aka.ms/msal-net-wam On Mac, Linux, and older versions of Windows a broker is not available. In .NET 6 apps, target net6.0-windows10.0.17763.0 for all Windows versions and target net6.0 for Linux and Mac. In .NET classic or .NET Core 3.1 apps, install Microsoft.Identity.Client.Desktop first and call WithDesktopFeatures(). In mobile apps, the device must be Intune joined and Authenticator or Company Portal must be installed. See https://aka.ms/msal-brokers Used to determine if the currently available broker is able to perform Proof-of-Possession. Boolean indicating if Proof-of-Possession is supported Component to be used with confidential client applications like web apps/APIs. This component supports Subject Name + Issuer authentication in order to help, in the future, Azure AD certificates rollover. [V2 API] Acquires token from the service for the confidential client using the client credentials flow. (See https://aka.ms/msal-net-client-credentials) This method enables application developers to achieve easy certificates roll-over in Azure AD: this method will send the public certificate to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation). Array of scopes requested for resource Authentication result containing application token for the requested scopes [V2 API] Acquires token from the service for the confidential client using the client credentials flow. (See https://aka.ms/msal-net-client-credentials) This method attempts to look up valid access token in the cache unless is true This method enables application developers to achieve easy certificates roll-over in Azure AD: this method will send the public certificate to Azure AD along with the token request, so that Azure AD can use it to validate the subject name based on a trusted issuer policy. This saves the application admin from the need to explicitly manage the certificate rollover (either via portal or PowerShell/CLI operation) Array of scopes requested for resource If TRUE, API will ignore the access token in the cache and attempt to acquire new access token using client credentials Authentication result containing application token for the requested scopes [V2 API] Acquires token using On-Behalf-Of flow. (See https://aka.ms/msal-net-on-behalf-of) Array of scopes requested for resource Instance of UserAssertion containing user's token. Authentication result containing token of the user for the requested scopes [V2 API] Acquires token using On-Behalf-Of flow. (See https://aka.ms/msal-net-on-behalf-of) Array of scopes requested for resource Instance of UserAssertion containing user's token. Specific authority for which the token is requested. Passing a different value than configured does not change the configured value Authentication result containing token of the user for the requested scopes Structure containing static members that you can use to specify how the interactive overrides of AcquireTokenAsync in should prompt the user. Checks Android device for chrome packages. Returns true if chrome package for launching system webview is enabled on device. Returns false if chrome package is not found. The following code decides, in a Xamarin.Forms app, which browser to use based on the presence of the required packages. bool useSystemBrowser = UIParent.IsSystemWebviewAvailable(); App.UIParent = new UIParent(Xamarin.Forms.Forms.Context as Activity, !useSystemBrowser); Token cache storing access and refresh tokens for accounts This class is used in the constructors of and . In the case of ConfidentialClientApplication, two instances are used, one for the user token cache, and one for the application token cache (in the case of applications using the client credential flows). IMPORTANT: this class is performance critical; any changes must be benchmarked using Microsoft.Identity.Test.Performance. More information about how to test and what data to look for is in https://aka.ms/msal-net-performance-testing. Gets or sets the flag indicating whether the state of the cache has changed. MSAL methods set this flag after any change. Caller applications should reset the flag after serializing and persisting the state of the cache. Serializes the entire token cache in both the ADAL V3 and unified cache formats. Serialized token cache / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Deserializes the token cache from a serialization blob in both format (ADAL V3 format, and unified cache format) Array of bytes containing serialize cache data / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Serializes using the serializer. Obsolete: Please use specialized Serialization methods. replaces . / Is our recommended way of serializing/deserializing. For interoperability with ADAL.NET v3. array of bytes, / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Deserializes the token cache from a serialization blob in the unified cache format Obsolete: Please use specialized Deserialization methods. replaces / Is our recommended way of serializing/deserializing. For interoperability with ADAL.NET v3 Array of bytes containing serialized MSAL.NET V2 cache data / is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java. Is a Json blob containing access tokens, refresh tokens, id tokens and accounts information. Notification for certain token cache interactions during token acquisition. This delegate is used in particular to provide a custom token cache serialization Arguments related to the cache item impacted This is removed in MSAL.NET v4. Read more: https://aka.ms/msal-net-4x-cache-breaking-change This is removed in MSAL.NET v4. Read more: https://aka.ms/msal-net-4x-cache-breaking-change This is removed in MSAL.NET v4. Read more: https://aka.ms/msal-net-4x-cache-breaking-change This is removed in MSAL.NET v4. Read more: https://aka.ms/msal-net-4x-cache-breaking-change This is removed in MSAL.NET v4. Read more: https://aka.ms/msal-net-4x-cache-breaking-change This is removed in MSAL.NET v4. Read more: https://aka.ms/msal-net-4x-cache-breaking-change Constructor of a token cache. This constructor is left for compatibility with MSAL 2.x. The recommended way to get a cache is by using and IConfidentialClientApplication.AppTokenCache once the app is created. Sets the security group to be used with the iOS Keychain. This function should not be used by external customers. It will be removed in a future version of MSAL. delete all cache entries with intersecting scopes. this should not happen but we have this as a safe guard against multiple matches. Important note: we should not be suggesting expiration dates that are in the past, as it breaks some cache implementations. IMPORTANT: this class is performance critical; any changes must be benchmarked using Microsoft.Identity.Test.Performance. More information about how to test and what data to look for is in https://aka.ms/msal-net-performance-testing. Scenario: client_creds with default in-memory cache can get to ~500k tokens For testing purposes only. Expires ALL access tokens in memory and fires OnAfterAccessAsync event with no cache key Get accounts should not make a network call, if possible. This can be achieved if all the environments in the token cache are known to MSAL, as MSAL keeps a list of known environments in Removes OBO tokens stored in the cache. Note that the cache is internally and externally partitioned by the oboKey. Notification method called before any library method accesses the cache. Notification method called before any library method writes to the cache. This notification can be used to reload the cache state from a row in database and lock that row. That database row can then be unlocked in the notification. Notification method called after any library method accesses the cache. Sets a delegate to be notified before any library method accesses the cache. This gives an option to the delegate to deserialize a cache entry for the application and accounts specified in the . See https://aka.ms/msal-net-token-cache-serialization Delegate set in order to handle the cache deserialization In the case where the delegate is used to deserialize the cache, it might want to call Sets a delegate to be notified after any library method accesses the cache. This gives an option to the delegate to serialize a cache entry for the application and accounts specified in the . See https://aka.ms/msal-net-token-cache-serialization Delegate set in order to handle the cache serialization in the case where the member of the cache is true In the case where the delegate is used to serialize the cache entirely (not just a row), it might want to call Sets a delegate called before any library method writes to the cache. This gives an option to the delegate to reload the cache state from a row in database and lock that row. That database row can then be unlocked in the delegate registered with Delegate set in order to prepare the cache serialization This exception indicates that claims have been returned from the endpoint that need to be resolved. This can be achieved by using them in the next authentication request. See Conditional Access and claims challenges. See Handling multifactor auth (MFA), Conditional Access, and incremental consent. Initializes a new instance of the exception class with a specified error code and error message. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Initializes a new instance of the exception class with a specified error code, error message and inner exception indicating the root cause. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Represents the root cause of the exception. Initializes a new instance of the exception class with a specified error code, error message and inner exception indicating the root cause. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Represents the root cause of the exception. A higher level description for this exception, that allows handling code to understand what type of action it needs to take to resolve the issue. This exception class represents errors that are local to the library or the device. Contrary to which represent errors happening from the Azure AD service or the network. For more details, see https://aka.ms/msal-net-exceptions Initializes a new instance of the exception class with a specified error code. The error code returned by the service or generated by client. This is the code you can rely on for exception handling. Initializes a new instance of the exception class with a specified error code and error message. The error code returned by the service or generated by client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Initializes a new instance of the exception class with a specified error code, error message and inner exception. The error code returned by the service or generated by client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Error code returned as a property in MsalException Standard OAuth2 protocol error code. It indicates that the application needs to expose the UI to the user so that the user does an interactive action in order to get a new token. Mitigation: If your application is a call AcquireTokenInteractive perform an interactive authentication. If your application is a chances are that the Claims member of the exception is not empty. See for the right mitigation Standard OAuth2 protocol error code. It indicates that the application needs to expose the UI to the user so the user can do an interactive log-in to get a token with updated claims. Mitigation: If your application is a call AcquireTokenInteractive perform an interactive authentication. If your application is a chances are that the Claims member of the exception is not empty. See for the right mitigation No token was found in the token cache. Mitigation: If your application is a call AcquireTokenInteractive so that the user of your application signs-in and accepts consent. If it's a web app you should have previously called IConfidentialClientApplication.AcquireTokenByAuthorizationCode as described in https://aka.ms/msal-net-authorization-code. You need to make sure that you have requested the right scopes. For details See https://github.com/Azure-Samples/ms-identity-aspnetcore-webapp-tutorial This error should not happen in web APIs This error code comes back from calls when a null user is passed as the account parameter. This can be because you have called AcquireTokenSilent with an account parameter set to accounts.FirstOrDefault() but accounts is empty. Mitigation Pass a different account, or otherwise call This error code comes back from calls when a null user assertion is passed as the UserAssertion parameter. Mitigation Pass a valid value for user assertion This error code comes back from calls when the user is passed as the account parameter. Only some brokers (WAM) can login the current user. Mitigation On Windows, use the broker via .WithBroker(true), use a different account, or otherwise call This error code denotes that no account was found having the given login hint. What happens? or was called with a loginHint parameter which does not match any account in Mitigation If you are certain about the loginHint, call This error code denotes that multiple accounts were found having the same login hint and MSAL cannot choose one. Please use to specify the account This error code comes back from calls when the user cache had not been set in the application constructor. This should never happen in MSAL.NET 3.x as the cache is created by the application One of two conditions was encountered: The Prompt.NoPrompt was passed in an interactive token call, but the constraint could not be honored because user interaction is required, for instance because the user needs to re-sign-in, give consent for more scopes, or perform multiple factor authentication. An error occurred during a silent web authentication that prevented the authentication flow from completing in a short enough time frame. Remediation:call AcquireTokenInteractive so that the user of your application signs-in and accepts consent. Service is unavailable and returned HTTP error code within the range of 500-599 Mitigation you can retry after a delay. The HTTP Request to the STS timed out. Mitigation you can retry after a delay. Service returned HTTP error code 429 which indicates the request has been throttled. For more details see https://aka.ms/msal-net-throttling loginHint should be a UPN What happens? An override of a token acquisition operation was called in which takes a loginHint as a parameters, but this login hint was not using the UserPrincipalName (UPN) format, e.g. john.doe@contoso.com expected by the service Remediation Make sure in your code that you enforce loginHint to be a UPN No passive auth endpoint was found in the OIDC configuration of the authority What happens? When the libraries go to the authority and get its open id connect configuration it expects to find a Passive Auth Endpoint entry, and could not find it. remediation Check that the authority configured for the application, or passed on some overrides of token acquisition tokens supporting authority override is correct Invalid authority What happens When the library attempts to discover the authority and get the endpoints it needs to acquire a token, it got an un-authorize HTTP code or an unexpected response remediation Check that the authority configured for the application, or passed on some overrides of token acquisition tokens supporting authority override is correct Invalid authority type. MSAL.NET does not know how to interact with the authority specified when the application was built. Mitigation Use a different authority The client is unauthorized to access resource. This commonly happens when Mobile App Management (MAM) policies are enabled. MSAL will throw an exception in that case with protection_policy_required sub-error. Mitigation Catch the exception and use the properties in it to obtain the right parameters from Intune SDK. IntuneAppProtectionPolicyRequiredException Unknown Error occurred. Mitigation None. You might want to inform the end user. Unknown broker error occurred. Mitigation None. You might want to inform the end user. WAM Signout failed. Authentication failed. What happens? The authentication failed. For instance the user did not enter the right password Mitigation Inform the user to retry. Authority validation failed. What happens? The validation of the authority failed. This might be because the authority is not compliant with the OIDC standard, or there might be a security issue Mitigation Use a different authority. If you are absolutely sure that you can trust the authority you can use the passing the validateAuthority parameter to false (not recommended) Invalid owner window type. What happens? You used "AcquireTokenInteractiveParameterBuilder.WithParentActivityOrWindow(object) but the parameter you passed is invalid. Remediation On .NET Standard, the expected object is an Activity on Android, a UIViewController on iOS, a NSWindow on MAC, and a IWin32Window or IntPr on Windows. If you are in a WPF application, you can use WindowInteropHelper(wpfControl).Handle to get the window handle associated with a WPF control Encoded token too long. What happens In a confidential client application call, the client assertion built by MSAL is longer than the max possible length for a JWT token. User Mismatch. Failed to refresh token. What happens? The token could not be refreshed. This can be because the user has not used the application for a long time. and therefore the refresh token maintained in the token cache has expired Mitigation If you are in a public client application, that supports interactivity, send an interactive request . Otherwise, use a different method to acquire tokens. Failed to acquire token silently. Used in broker scenarios. What happens you called or and your mobile (Xamarin) application leverages the broker (Microsoft Authenticator or Microsoft Company Portal), but the broker was not able to acquire the token silently. Mitigation Call RedirectUri validation failed. What happens? The redirect URI / reply URI is invalid How to fix Pass a valid redirect URI. The request could not be preformed because of an unknown failure in the UI flow.* Mitigation Inform the user. Internal error Accessing WS Metadata Exchange Failed. What happens? You tried to use and the account is a federated account. Mitigation None. The WS metadata was not found or does not correspond to what was expected. Federated service returned error. Mitigation None. The federated service returned an error. You can try to look at the Body of the exception for a better understanding of the error and choose the mitigation User Realm Discovery Failed. Resource Owner Password Credential (ROPC) grant attempted with an MSA (Microsoft personal) account. ROPC does not support MSA accounts. See https://aka.ms/msal-net-ropc for details. Federation Metadata URL is missing for federated user. Parsing WS Metadata Exchange Failed. WS-Trust Endpoint Not Found in Metadata Document. You can get this error when using In the case of a Federated user (that is owned by a federated IdP, as opposed to a managed user owned in an Azure AD tenant) ID3242: The security token could not be authenticated or authorized. The user does not exist or has entered the wrong password This can occur if there is an configuration issue in the ADFS environment where this is authenticating. See https://aka.ms/msal-net-iwa-troubleshooting for more details What happens You can get this error when using The user is not recognized as a managed user, or a federated user. Azure AD was not able to identify the IdP that needs to process the user Mitigation Inform the user. the login that the user provided might be incorrect. What happens You can get this error when using The user is not known by the IdP Mitigation Inform the user. The login that the user provided might be incorrect (for instance empty) Failed to get user name. Password is required for managed user. What happens? If can got this error when using and you (or the user) did not provide a password. Request is invalid. What happens? This can happen because you are using a token acquisition method which is not compatible with the authority. For instance: you called but you used an authority ending with '/common' or '/consumers' as this requires a tenanted authority or '/organizations'. Mitigation Adjust the authority to the AcquireTokenXX method you use (don't use 'common' or 'consumers' with Cannot access the user from the OS (UWP) What happens You called , but the domain user name could not be found. Mitigation This might be because you need to add more capabilities to your UWP application in the Package.appxmanifest. See https://aka.ms/msal-net-uwp Cannot get the user from the OS (UWP) What happens You called , but the domain user name could not be found. Mitigation This might be because you need to add more capabilities to your UWP application in the Package.appxmanifest. See https://aka.ms/msal-net-uwp An error response was returned by the OAuth2 server and it could not be parsed What happens? In the context of Device code flow (See https://aka.ms/msal-net-device-code-flow), this error happens when the device code expired before the user signed-in on another device (this is usually after 15 mins). Mitigation None. Inform the user that they took too long to sign-in at the provided URL and enter the provided code. Integrated Windows Auth is only supported for "federated" users On Android, you need to call AcquireTokenInteractiveParameterBuilder.WithParentActivityOrWindow(object) passing the activity. See https://aka.ms/msal-interactive-android Broker response hash did not match Broker response returned an error Broker response nonce does not match the request nonce sent by MSAL.NET for iOS broker >= v6.3.19 MSAL is not able to invoke the broker. Possible reasons are the broker is not installed on the user's device, or there were issues with the UiParent or CallerViewController being null. See https://aka.ms/msal-brokers MSAL is not able to find a suitable account to use with broker MSAL cannot find the broker application to authenticate accounts. Null intent was returned so broker activity cannot be launched Failed to validate android broker signature Failed To Complete Android Broker Operation Unable to query the Android account manager because no username or home account ID is provided in the silent authentication request. Error code used when the HTTP response returns HttpStatusCode.NotFound ErrorCode used when the HTTP response returns something different from 200 (OK) HttpStatusCode.NotFound have a specific error code. Error code used when the has returned a URI, but it is invalid - it is either null or has no code. Consider throwing an exception if you are unable to intercept the URI containing the code. Error code used when the CustomWebUI has returned a URI, but it does not match the Authority and AbsolutePath of the configured redirect URI. Access denied. Cannot Access User Information or the user is not a user domain. What happens? You tried to use but the user is not a domain user (the machine is not domain or AAD joined) RedirectUri validation failed. No Redirect URI. What happens? You need to provide a Reply URI / Redirect URI, but have not called Multiple Tokens were matched. What happens?This exception happens in the case of applications managing several identities, when calling or one of its overrides and the user token cache contains multiple tokens for this client application and the specified Account, but from different authorities. Mitigation [App Development]specify the authority to use in the acquire token operation Non HTTPS redirects are not supported What happens?This error happens when the authorization flow, which collects user credentials, gets redirected to an page that is not supported, for example if the redirect occurs over http. This error does not trigger for the final redirect, which can be http://localhost, but for intermediary redirects. MitigationThis usually happens when using a federated directory which is not setup correctly. The request could not be preformed because the network is down. Mitigation [App development] In the application you could either inform the user that there are network issues or retry later The B2C authority host is not the same as the one used when creating the client application. The cloud (authority URL host) defined at the application level cannot be different than the cloud at the request level. What happens?You did not define an authority at the application level, so it defaults to the public cloud (login.microsoft.com), but the authority at the request level is for a different cloud. Only the tenant can be changed at the request level. MitigationAdd .WithAuthority("https://login.windows-ppe.net/common) at the application level and specify the tenant at the request level: .WithAuthority("https://login.windows-ppe.net/1234-567-890-12345678). Duplicate query parameter was found in extraQueryParameters. What happens? You have used extraQueryParameter of overrides of token acquisition operations in public client and confidential client application and are passing a parameter which is already present in the URL (either because you had it in another way, or the library added it). Mitigation [App Development] RemoveAccount the duplicate parameter from the token acquisition override. The request could not be performed because of a failure in the UI flow. What happens?The library failed to invoke the Web View required to perform interactive authentication. The exception might include the reason MitigationIf the exception includes the reason, you could inform the user. This might be, for instance, a browser implementing chrome tabs is missing on the Android phone (that's only an example: this exception can apply to other platforms as well) Authentication canceled. What happens?The user had canceled the authentication, for instance by closing the authentication dialog MitigationNone, you cannot get a token to call the protected API. You might want to inform the user JSON parsing failed. What happens?A JSON blob read from the token cache or received from the STS was not parseable. This can happen when reading the token cache, or receiving an IDToken from the STS. MitigationMake sure that the token cache was not tampered JWT was invalid. What happens?The library expected a JWT (for instance a token from the cache, or received from the STS), but the format is invalid MitigationMake sure that the token cache was not tampered State returned from the STS was different from the one sent by the library What happens?The library sends to the STS a state associated to a request, and expects the reply to be consistent. This errors indicates that the reply is not associated with the request. This could indicate an attempt to replay a response Mitigation None Tenant discovery failed. What happens?While reading the OpenId configuration associated with the authority, the Authorize endpoint, or Token endpoint, or the Issuer was not found MitigationThis indicates and authority which is not Open ID Connect compliant. Specify a different authority in the constructor of the application, or the token acquisition override /// The library is loaded on a platform which is not supported. An authorization Uri has been intercepted, but it cannot be parsed. See the log for more details. What happens?The current redirect URL is not a loopback URL. Mitigation To use the OS browser, a loopback URL, with or without a port, must be configured both during app registration and when initializing the IPublicClientApplication object. See https://aka.ms/msal-net-os-browser for details. What happens?MSAL has intercepted a Uri possibly containing an authorization code, but it does not match the configured redirect URL. MitigationIf you are using an ICustomWebUi implementation, make sure the redirect URL matches the URL containing the auth code. If you are not using an ICustomWebUI, this could be a man-in-the middle attack. What happens?MSAL tried to open the browser on Linux using the xdg-open, gnome-open, or kfmclient tools, but failed. MitigationMake sure you can open a page using xdg-open tool. See https://aka.ms/msal-net-os-browser for details. The selected WebView is not available on this platform. You can switch to a different WebView using . See https://aka.ms/msal-net-os-browser for details What happens?You configured MSAL interactive authentication to use an embedded WebView and you also configured . These are mutually exclusive. MitigationEither set to true or do not use What happens?You configured MSAL confidential client authentication with more than one authentication type (Certificate, Secret, Client Assertion) What happens?You configured MSAL confidential client authentication without an authentication type (Certificate, Secret, Client Assertion) MitigationEither call ConfidentialClientApplicationBuilder.WithClientSecret, ConfidentialClientApplicationBuilder.WithCertificate, ConfidentialClientApplicationBuilder.WithClientAssertion Issue can be resolved by user interaction during the interactive authentication flow. See https://aka.ms/msal-net-UiRequiredException for details Issue can be resolved by additional remedial interaction with the system, outside of the interactive authentication flow. Interactive authentication is still required to inform the user of what is needed. Calling application may choose to hide flows that require additional_action if the user is unlikely to complete the remedial action. Example: Issue cannot be resolved at this time. Launching interactive authentication flow will show a message explaining the condition. User's password has expired. User consent is missing, or has been revoked. Internal to MSALs. Indicates that no further silent calls should be made with this refresh token. Internal to MSALs. Indicates that no further silent calls should be made with this refresh token. Internal to MSALs. Needed in ios/android to complete the end-to-end true MAM flow. This sub-error code is re-mapped to a different top level error code (IntuneAppProtectionPoliciesRequired), and not InteractionRequired Internal to MSALs. Used in scenarios where an application is using family refresh token even though it is not part of FOCI (or vice versa). Needed to handle cases where app changes FOCI membership after being shipped. This is handled internally and doesn't need to be exposed to the calling app. Please see FOCI design document for more details. Internal to MSALs. Indicates that device should be re-registered. AAD service error indicating that the configured authority does not exist What happens?You have configured your own instance metadata, but the json provided seems to be invalid. MitigationSee https://aka.ms/msal-net-custom-instance-metadata for an example of a valid json that can be used. What happens?You have configured your own instance metadata, and have also set validate authority to true. These are mutually exclusive. MitigationSet the validate authority flag to false. See https://aka.ms/msal-net-custom-instance-metadata for more details. What happens?You haven't set a client ID. MitigationUse the application ID (a GUID) from the application portal as client ID in this SDK What happens?You have configured both a telemetry callback and a telemetry config. MitigationOnly one telemetry mechanism can be configured. Azure AD service error indicating a configuration issue. MitigationSee error message for details, then take corrective action in the app registration portal See https://aka.ms/msal-net-invalid-client for details. What happens?You have configured MSAL to request SSH certificates from AAD, and you are trying to format an HTTP authentication header. MitigationSSH certificates should not used as Bearer tokens. Developers are responsible for sending the certificates to the target machines. What happens?Windows Authentication Broker, which handles the interaction between the user and AAD, has failed. MitigationSee the error message for more details. What happens?You asked for one type of token, but did not receive it. MitigationThis happens if the Identity Provider (AAD, B2C, ADFS etc.) does not support / implement the requested token type. In case of ADFS, consider upgrading to the latest version. What happens?The response from the token endpoint does not contain the token_type parameter. MitigationThis happens if the identity provider (AAD, B2C, ADFS, etc.) did not include the access token type in the token response. Verify the configuration of the identity provider. What happens?You are trying to use a feature which was marked as experimental MitigationWhen creating the PublicClientApplication or ConfidentialClientApplication, use .WithExperimentalFeatures() option. See https://aka.ms/msal-net-experimental-features for details. What happens?A broker application is required, but one could not be found or communicated with. MitigationInstall a broker application, such as Authenticator, from the application store What happens?You are trying to authenticate with the broker but MSAL is unable to read the response from the broker. MitigationThe currently installed broker may not support MSAL.Xamarin, you need to ensure that you have installed either Intune Company Portal (5.0.4689.0 or greater) or Microsoft Authenticator (6.2001.0140 or greater). see https://aka.ms/Brokered-Authentication-for-Android" What happens?You have configured a claims request, but the claims string is not in JSON format MitigationEnsure that the claims parameter is valid JSON. Inspect the inner exception for details about JSON parsing. What happens?The authority configured at the application level is different than the authority configured at the request level MitigationEnsure the same authority type is used What happens?You specified a tenant twice - once in WithAuthority() and once using WithTenant() MitigationSpecify the tenant once. What happens?You have configured your own instance metadata using both an Uri and a string. Only one is supported. MitigationCall WithInstanceDiscoveryMetadata only once. See https://aka.ms/msal-net-custom-instance-metadata for more details. What happens?No scopes have been requested MitigationAt least one scope must be specified for this authentication flow What happens?The certificate provided does not have a private key. MitigationEnsure the certificate has a private key. What happens?The certificate provided is not of type RSA. MitigationPlease use an RSA certificate. Device certificate not found. What happens?The ADAL cache is invalid as it contains multiple refresh token entries for one user. MitigationDelete the ADAL cache. If you do not maintain an ADAL cache, this may be a bug in MSAL. Region discovery failed. What happens?WithAzureRegion is set to true MitigationRegion discovery cannot be performed for ADFS authority. What happens?The request has broker enabled and Proof-of-Possession configured but the broker does not support Proof-of-Possession Mitigationonly configure Proof-of-Possession for public clients on windows. What happens?The request has Proof-of-Possession configured but does not have broker enabled. Broker is required to use Proof-of-Possession on public clients MitigationEnable the broker when Proof-of-Possession is configured. What happens?Broker is configured with an ADFS authority, however, it does not support ADFS environments. MitigationBroker does not support ADFS environments. What happens?The request has Proof-of-Possession configured but does not have a nonce configured. A nonce is required for Proof-of-Possession on public clients MitigationProvide a nonce when Proof-of-Possession is configured for public clients. Xamarin.iOS specific. This error indicates that keychain access has not been enabled for the application. From MSAL 2.x and ADAL 4.x, the keychain for the publisher needs to be accessed in order to provide Single Sign On between applications of the same publisher. Mitigation In order to access the keychain on iOS, you will need to ensure the Entitlements.plist file is configured and included under &lt;CodesignEntitlements&gt;Entitlements.plist&lt;/CodesignEntitlements&gt; in the csproj file of the iOS app. For more details See https://aka.ms/msal-net-enable-keychain-access Xamarin.iOS specific. This error indicates that saving a token to the keychain failed. Mitigation In order to access the keychain on iOS, you will need to set the keychain access groups in the Entitlements.plist for the application. For more details See https://aka.ms/msal-net-enable-keychain-groups Xamarin.iOS + broker specific. This error indicates that the UIViewController is null. Mitigation In order to access the broker, you will need to pass in a UIViewController. For more details see https://aka.ms/msal-net-ios-broker Xamarin.iOS + broker specific. This error indicates that the writing of the application token from iOS broker to the keychain threw an exception. No SecStatusCode was returned. Mitigation Check the logs. For more details see https://aka.ms/msal-net-ios-broker Xamarin.iOS + broker specific. This error indicates that the reading of the application token from the keychain threw an exception. No SecStatusCode was returned. Mitigation Check the logs. For more details see https://aka.ms/msal-net-ios-broker A broker key was generated but it was not saved to the KeyChain. Mitigation Make sure the app has permissions to write to the keychain group 'com.microsoft.adalcache'. Capture and inspect the logs to see why the save operation failed. A broker key was generated but it was not retrieved from the KeyChain. Mitigation Make sure the app has permissions to write to the keychain group 'com.microsoft.adalcache'. Capture and inspect the logs to see why the fetch operation failed. When calling AcquireTokenInteractive with the WAM broker, the call must be made from the UI thread. The Windows broker (WAM) is only supported in conjunction with "work and school" accounts and with Microsoft accounts. WAM service exception that can occur when calling AcquireTokenInteractive WAM service exception that can occur when calling AcquireTokenInteractive and the account picker pops up What happens?No scopes have been requested MitigationAt least one scope must be specified for MSAL Runtime WAM What happens?The embedded browser cannot be started because a runtime component is missing. MitigationThe embedded browser needs WebView2 runtime to be installed. An end user of the app can download and install the WebView2 runtime from https://go.microsoft.com/fwlink/p/?LinkId=2124703 and restart the app. The app developer can get the distributable version of the WebView2 runtime. What happens?The embedded WebView2 browser cannot be started because a runtime component cannot be loaded. Mitigation For troubleshooting details, see https://aka.ms/msal-net-webview2 . What happens?You configured both Regional Authority and Authority Validation. Authority validation is not currently supported for regional authorities. MitigationSet the validateAuthority flag to false to use Azure Regional authority. Do not disable authority validation if you read the authority from an untrusted source, for example from the WWWAuthenticate header of an HTTP request that resulted in a 401 response. What happens?You have configured both Region Discovery and Custom Instance Metadata. Custom metadata supersedes region discovery. MitigationConfigure either Region Discovery or Custom Instance Discovery Metadata. An HttpListenerException occurred while listening for the system browser to complete the login. What happens?Failure setting process security to enable WAM Account Picker in an elevated process. MitigationFor troubleshooting details, see https://aka.ms/msal-net-wam . What happens?You configured MSAL cache serialization at the same time with a static internal cache via These are mutually exclusive. Mitigation Use only one option. Web site and web API scenarios should rely on external cache serialization, as internal cache serialization cannot scale. See https://aka.ms/msal-net-cca-token-cache-serialization What happens?You configured WithTenant at the request level, but the application is using a non-AAD authority These are mutually exclusive. Mitigation WithTenantId can only be used in conjunction with AAD authorities. What happens?You configured WithAuthority at the request level, and also WithAzureRegion. This is not supported when the environment changes from application to request. Mitigation Use WithTenantId at the request level instead. What happens?The token cache does not contain a token with an OBO cache key that matches the longRunningProcessSessionKey passed into . Mitigation Call with this longRunningProcessSessionKey first or call with an already used longRunningProcessSessionKey. A required value is missing from the token provider response MSAL is unable to parse the authentication header returned from the endpoint. This can be a result of a malformed header returned in either the WWW-Authenticate or the Authentication-Info collections. A required value is missing from the managed identity response. Managed Identity error response was received. Managed Identity endpoint is not reachable. Unknown error response received. Invalid managed identity endpoint. Exactly one scope is expected. User assigned managed identity is not supported for this source. User assigned managed identity is not configurable at runtime for service fabric. Using combined flat storage, like a file, to store both app and user tokens is not supported. Use a partitioned token cache (for ex. distributed cache like Redis) or separate files for app and user token caches. See https://aka.ms/msal-net-token-cache-serialization . Setting the CIAM authority (ex. "{tenantName}.ciamlogin.com") at the request level is not supported. The CIAM authority must be set during application creation. A cryptographic exception occurred when trying to use the provided certificate The active directory authentication error message. Base exception type thrown when an error occurs during token acquisition. For more details, see https://aka.ms/msal-net-exceptions Avoid throwing this exception. Instead throw the more specialized or An property key, available when using desktop brokers. An property key, available when using desktop brokers. An property key, available when using desktop brokers. An property key, available when using desktop brokers. An property key, available when using desktop brokers. An property key, available when using managed identity. Indicates if the previous operation that resulted in this exception should be retried. Initializes a new instance of the exception class. Initializes a new instance of the exception class with a specified error code. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. Initializes a new instance of the exception class with a specified error code and error message. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Initializes a new instance of the exception class with a specified error code and a reference to the inner exception that is the cause of this exception. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or a null reference if no inner exception is specified. Gets the protocol error code returned by the service or generated by the client. This is the code you can rely on for exception handling. Values for this code are typically provided in constant strings in the derived exceptions types with explanations of mitigation. An ID that can used to piece up a single authentication flow. A property bag with extra details for this exception. Creates and returns a string representation of the current exception. A string representation of the current exception. Allows serialization of most values of the exception into JSON. Allows re-hydration of the MsalException (or one of its derived types) from JSON generated by ToJsonString(). This exception class is for exceptions generated from Managed Identity sources. This class is deprecated and will be removed in a future release. Catch MsalServiceException instead. For more details, see https://aka.ms/msal-net-managed-identity Initializes a new instance of the exception class with a specified error code, error message and inner exception indicating the root cause. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Specifies the managed identity source from which the exception initiates. Initializes a new instance of the exception class with a specified error code, error message and inner exception indicating the root cause. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Specifies the managed identity source from which the exception initiates. The status code of the response. Initializes a new instance of the exception class with a specified error code, error message and managed identity source. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Represents the root cause of the exception. Specifies the managed identity source from which the exception initiates. The status code of the response. Initializes a new instance of the exception class with a specified error code, error message and managed identity source. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Represents the root cause of the exception. Specifies the managed identity source from which the exception initiates. Specifies the managed identity source from which the exception initiates. Retry error codes specific to managed identity Exception type thrown when service returns an error response or other networking errors occur. For more details, see https://aka.ms/msal-net-exceptions Initializes a new instance of the exception class with a specified error code, error message and a reference to the inner exception that is the cause of this exception. The protocol error code returned by the service or generated by client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Initializes a new instance of the exception class with a specified error code, error message and a reference to the inner exception that is the cause of this exception. The protocol error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Status code of the response received from the service. Initializes a new instance of the exception class with a specified error code, error message and a reference to the inner exception that is the cause of this exception. The protocol error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or a null reference if no inner exception is specified. Initializes a new instance of the exception class with a specified error code, error message and a reference to the inner exception that is the cause of this exception. The protocol error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. HTTP status code of the response received from the service. The exception that is the cause of the current exception, or a null reference if no inner exception is specified. Initializes a new instance of the exception class with a specified error code, error message and a reference to the inner exception that is the cause of this exception. The protocol error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. The status code of the request. The claims challenge returned back from the service. The exception that is the cause of the current exception, or a null reference if no inner exception is specified. Gets the status code returned from HTTP layer. This status code is either the HttpStatusCode in the inner response or the NavigateError Event Status Code in a browser based flow (see NavigateError Event Status Codes). You can use this code for purposes such as implementing retry logic or error investigation. Additional claims requested by the service. When this property is not null or empty, this means that the service requires the user to provide additional claims, such as doing two factor authentication. The are two cases: If your application is a , you should just call and add the modifier. >If your application is a , (therefore doing the On-Behalf-Of flow), you should throw an HTTP unauthorize exception with a message containing the claims For more details see https://aka.ms/msal-net-claim-challenge Raw response body received from the server. Contains the HTTP headers from the server response that indicated an error. When the server returns a 429 Too Many Requests error, a Retry-After should be set. It is important to read and respect the time specified in the Retry-After header to avoid a retry storm. The suberror should not be exposed for public consumption yet, as STS needs to do some work first. A list of STS-specific error codes that can help in diagnostics. As per discussion with Evo, AAD Creates and returns a string representation of the current exception. A string representation of the current exception. Exception type thrown when MSAL detects that an application is trying to acquire a token too often, as a result of: - A previous request resulted in an HTTP response containing a Retry-After header which was not followed. - A previous request resulted in an HTTP 429 or 5xx, which indicates a problem with the server. The properties of this exception are identical to the original exception For more details see https://aka.ms/msal-net-throttling Constructor The original service exception that triggered the throttling. Exception type thrown when MSAL detects that an application is trying to acquire a token even though an was recently thrown. To mitigate this, when a is encountered, the application should switch to acquiring a token interactively. To better understand why the was thrown, inspect the property. The properties of this exception are identical to the original exception For more details see https://aka.ms/msal-net-throttling Constructor The original exception that triggered the throttling. This exception class is to inform developers that UI interaction is required for authentication to succeed. It's thrown when calling or one of its overrides, and when the token does not exists in the cache, or the user needs to provide more content, or perform multiple factor authentication based on Azure AD policies, etc.. For more details, see https://aka.ms/msal-net-exceptions Initializes a new instance of the exception class with a specified error code and error message. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Initializes a new instance of the exception class with a specified error code, error message and inner exception indicating the root cause. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Represents the root cause of the exception. Initializes a new instance of the exception class with a specified error code, error message and inner exception indicating the root cause. The error code returned by the service or generated by the client. This is the code you can rely on for exception handling. The error message that explains the reason for the exception. Represents the root cause of the exception. A higher level description for this exception, that allows handling code to understand what type of action it needs to take to resolve the issue. Classification of the conditional access error, enabling you to do more actions or inform the user depending on your scenario. See https://aka.ms/msal-net-UiRequiredException for more details. Optional field, FOCI support. This method does not belong here - it is more tied to the Android code. However, that code is not unit testable, and this one is. The values of the JSON response are based on https://github.com/AzureAD/microsoft-authentication-library-common-for-android/blob/dev/common/src/main/java/com/microsoft/identity/common/internal/broker/BrokerResult.java Responsible for talking to all the Identity provider endpoints: - instance discovery - endpoint metadata - mex - /token endpoint via TokenClient - device code endpoint Do not expose these in the MsalException because Evo does not guarantee that the error codes remain the same. OAuth2 errors that are only used internally. All error codes used when propagating exceptions should be made public. Default timespan that blocks an application, if HTTP 429 and HTTP 5xx was received and Retry-After HTTP header was NOT returned by AAD. Exposed only for testing purposes For test purposes, so that the static state can be reset The Retry-After provider observes all service exceptions from all flows and looks for a header like: RetryAfter X seconds. It then enforces this header, by throttling for X seconds. Throttling is the action through which MSAL blocks applications from making repeated bad requests to the server. This works by MSAL detecting certain conditions when the server returns an error. If a similar request is then issued under the same condition, the same server error is returned by MSAL, without contacting the server. Throttling occurs in the following conditions: After receiving an RetryAfter header After receiving 429, 5xx HTTP status. This class manages the throttling providers and is itself a provider Client Throttling spec https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/1624 The strict thumbprint is based on: ClientId Authority Resource Scope Account To prevent the cache from becoming too large, purge expired entries every X seconds Default number of seconds that application returns the cached response, in case of UI required requests. Exposed only for testing purposes MsalUiRequiredException is thrown from AcquireTokenSilent, based on certain error codes from the server when contacting the token endpoint. Currently, throttling will only apply to public client applications at first. The strict thumbprint is based on: ClientId Authority (env + tenant) Scopes hash(RT) or UPN for IWA (not supported) Responsible for talking to the /token endpoint Used to avoid sending duplicate "last request" telemetry from a multi-threaded environment A client side library needs to communicate to the server side that it has implemented enforcement of HTTP 429 and Retry-After header. Because if the server-side detects loops, then it can break the loop by sending either HTTP 429 or Retry-After header with a different HTTP status. Right now, the server side breaks the loops by invalid_grant response, which breaks protocol under some condition and also causes unexplained prompt. Add Claims, including ClientCapabilities, to body parameter for POST request. Extension methods Returns true if MSAL can use a system browser. On Windows, Mac and Linux a system browser can always be used, except in cases where there is no UI, e.g. SSH connection. On Android, the browser must support tabs. Returns true if MSAL can use an embedded webview (browser). Currently there are no embedded webviews on Mac and Linux. On Windows, app developers or users should install the WebView2 runtime and this property will inform if the runtime is available, see https://aka.ms/msal-net-webview2 Returns false when the program runs in headless OS, for example when SSH-ed into a Linux machine. Browsers (webviews) and brokers cannot be used if there is no UI support. Instead, please use or Returns the certificate used to create this , if any. Returns the platform / os specific implementation of a PlatformProxy. Gets the platform proxy, which can be used to perform platform specific operations Common operations for extracting platform / operating system specifics. Scope: per app Gets the device model. On some TFMs this is not returned for security reasons. device model or null Gets the UPN of the user currently logged into the OS Returns the name of the calling assembly Returns the version of the calling assembly Returns a device identifier. Varies by platform. Gets the default redirect URI for the platform, which sometimes includes the clientId Returns the MSAL platform, e.g. MSAL.NetCore, MSAL.Desktop. Returns the framework runtime version on which the app is running, e.g. .NET Core 3.1.3, .NET Framework 4.8. Runtime version Go to a URL using the OS default browser. Most brokers take care of both silent auth and interactive auth, however some (iOS) does not support silent auth and gives the RT back to MSAL. WAM broker has a deeper integration into MSAL because MSAL needs to store WAM account IDs in the token cache. On Android and iOS, MSAL will save the legacy ADAL cache in a known location. On other platforms, the app developer must use the serialization callbacks AAD only supports RSA certs for client credentials Checks if the OS supports WAM (Web Account Manager) WAM Supported OS's are Windows 10 and above for Client, Windows 2019 and above for Server Returns true if the Windows Version has WAM support Constructs a bypass response to the PKeyAuth challenge on platforms where the challenge cannot be completed. Constructs a bypass response to the PKeyAuth challenge on platforms where the challenge cannot be completed. Stores tokens for an application. Partitions the access token collection by a key of client ID with tenant ID. App metadata collection is not partitioned. Refresh token, ID token, and account related methods are no-op. This method is not supported for the app token cache because there are no refresh tokens in a client credential flow. This method is not supported for the app token cache because there are no ID tokens in a client credential flow. This method is not supported for the app token cache because there are no user accounts in a client credential flow. This method is not supported for the app token cache because there are no ID tokens in a client credential flow. This method is not supported for the app token cache because there are no user accounts in a client credential flow. This method is not supported for the app token cache because there are no refresh tokens in a client credential flow. This method is not supported for the app token cache because there are no ID tokens in a client credential flow. This method is not supported for the app token cache because there are no user accounts in a client credential flow. WARNING: if partitionKey = null, this API is slow as it loads all tokens, not just from 1 partition. It should only support external token caching, in the hope that the external token cache is partitioned. Stores tokens for users. Partitions the access and refresh token collections by a user assertion hash in case of OBO and by home account ID otherwise. Partitions the ID token and account collections by home account ID. App metadata collection is not partitioned. WARNING: if partitionKey is null, this API is slow as it loads all tokens, not just from 1 partition. It should only support external token caching, in the hope that the external token cache is partitioned. WARNING: if partitionKey is null, this API is slow as it loads all tokens, not just from 1 partition. It should only support external token caching, in the hope that the external token cache is partitioned. WARNING: if partitionKey is null, this API is slow as it loads all tokens, not just from 1 partition. It should only support external token caching, in the hope that the external token cache is partitioned. WARNING: if partitionKey is null, this API is slow as it loads all tokens, not just from 1 partition. It should only support external token caching, in the hope that the external token cache is partitioned. WARNING: this API is slow as it loads all tokens, not just from 1 partition. It should only support external token caching, in the hope that the external token cache is partitioned. Used for platforms that do not implement PKeyAuth. A simple implementation of the HttpClient factory that uses a managed HttpClientHandler .NET should use the IHttpClientFactory, but MSAL cannot take a dependency on it. .NET should use SocketHandler, but UseDefaultCredentials doesn't work with it Attribute that will be picked up by the Xamarin Linker, as a hint for the linker to not remove the type. Needs to be added to types that get created by reflection, e.g. JSON serialization types It's important to not change the name and the 2 fields of this class. The linker looks for these. Structure containing static members that you can use to specify how the interactive overrides of AcquireTokenAsync in should prompt the user. AcquireToken will send prompt=select_account to the authorization server's authorize endpoint. which would present to the user a list of accounts from which one can be selected for authentication. This is the default prompt for backwards compatibility reasons. Please use for the best user experience. The user will be prompted for credentials by the service. It is achieved by sending prompt=login to the authorize endpoint. The user will be prompted to consent, even if consent was granted before. It is achieved by sending prompt=consent to the authorization server's authorize endpoint. Let the identity service decide on the best user experience, based on browser cookies and on the login hint, which can be specified using WithAccount() or WithLoginHint() This is the recommended prompt AcquireToken will send prompt=create to the authorization server's authorize endpoint which would trigger a sign-up experience, used for External Identities. More details at https://aka.ms/msal-net-prompt-create. Equals method override to compare Prompt structs object to compare against true if object are equal. Override to compute hash code hash code of the PromptValue Operator overload to check equality first value second value true if the objects are equal Operator overload to check inequality first value second value true if the objects are not equal Public Key Tokens for InternalsVisibleTo Contains the result of region when MSAL region discovery is used, published as part of AuthenticationResultMetadata. for additional metadata information of the authentication result. Constructor for RegionDetails Region Outcome based on MSAL region detection Region used to construct /token endpoint to contact ESTS. Error details when region auto detect fails This callback is for the raw telemetry events (app, HTTP, cache) that we want to aggregate using MATS. Responsible for recording API events and formatting CSV with telemetry. Not fully thread safe - it is possible that multiple threads request the "previous requests" data at the same time. It is the responsibility of the caller to protect against this. CSV expected format: 3|silent_successful_count|failed_requests|errors|platform_fields failed_request is: api_id_1,correlation_id_1,api_id_2,correlation_id_2|error_1,error_2 Expected format: 5|api_id,cache_info,region_used,region_autodetection,region_outcome|platform_config platform_config: is_token_cache_serialized,is_legacy_cache_enabled, token_type Controls the HTTP telemetry that MSAL sends to AAD via HTTP headers when contacting the /token endpoint. - It is assumed that one manager is created for each application and shared between requests - Implementer must be thread safe, since one app can fire multiple requests Record a stopped event Csv string with details about the current header (api used, force refresh flag) Csv string with details about the previous failed requests made: api, correlation id, error If AAD returns OK or a normal error (e.g. interaction required), then telemetry is recorded. If AAD returns a 5xx or 429 HTTP error (i.e. AAD is down), then telemetry has not been recorded and MSAL will continue to hold on to this data until a successful request is made Resets the state of failed requests. See for more details Extension methods used for telemetry client. Checks if any of the clients in the set of s are enabled for a given . Set of clients to check. Event name to evaluate. True if any of the clients are enabled for the eventName, otherwise false. Sends the same input events to each telemetry client. Clients to emit telemetry to. Telemetry details to emit. Stores details to log to the . Type of cache used. This data is captured from MSAL or Microsoft.Identity.Web to log to telemetry. Represents an account in a specific tenant. The same account can exist in its home tenant and also as a guest in multiple other tenants. Access tokens and Id Tokens are tenant specific and this object provides high level information about all the ID tokens associated with the account. The immutable identifier for an user account, in a specific tenant. This ID uniquely identifies the user across applications - two different applications signing in the same user will receive the same value in the oid claim. The user will have a different object ID in each tenant - they're considered different accounts, even though the user logs into each account with the same credentials. This claim is issued by Microsoft Identity Providers and can be null. Fallback to the sub claim, which is scoped to a user and an app. Represents the tenant that the user is signing in to. For work and school accounts, the GUID is the immutable tenant ID of the organization that the user is signing in to. For sign-ins to the personal Microsoft account tenant (services like Xbox, Teams for Life, or Outlook), the value is 9188040d-6c67-4c5b-b112-36a304b66dad. All the claims present in the ID Token associated with this profile. Returns true if this profile is associated with the user's home tenant. Extension methods for ITokenCache Options for MSAL token caches. MSAL maintains a token cache internally in memory. By default, this cache object is part of each instance of or . This method allows customization of the in-memory token cache of MSAL. MSAL's memory cache is different than token cache serialization. Cache serialization pulls the tokens from a cache (e.g. Redis, Cosmos, or a file on disk), where they are stored in JSON format, into MSAL's internal memory cache. Memory cache operations do not involve JSON operations. External cache serialization remains the recommended way to handle desktop apps, web site and web APIs, as it provides persistence. These options do not currently control external cache serialization. Detailed guidance for each application type and platform: https://aka.ms/msal-net-token-cache-serialization Either the UserTokenCache or the AppTokenCache, for which these options apply. Options for the internal MSAL token caches. Specifies the source of the access and Id tokens in the authentication result. The source of the access and Id token is Identity Provider - Microsoft Entra ID, ADFS or AAD B2C. The source of access and Id token is MSAL's cache. The source of the access and Id token is a broker application - Authenticator or Company Portal. Brokers are supported only on Android and iOS. Details about the cause of an , giving a hint about what the user can expect when they go through interactive authentication. See Understanding MsalUiRequiredException for details. No details are provided. It is possible that the user will be able to resolve the issue by launching interactive authentication. This is also the classification when no account or valid login hint is passed to . See Understanding MsalUiRequiredException for details. Issue cannot be resolved. Launching interactive authentication flow will show a message explaining the condition. See Understanding MsalUiRequiredException for details. Issue can be resolved by user interaction during the interactive authentication flow. See Understanding MsalUiRequiredException for details. Issue can be resolved by additional remedial interaction within the system, outside of the interactive authentication flow. Starting an interactive authentication flow will show the user what they need to do but it is possible that the user will be unable to complete the action. See Understanding MsalUiRequiredException for details. User consent is missing or has been revoked. Issue can be resolved by user consenting during the interactive authentication flow. See Understanding MsalUiRequiredException for details. User's password has expired. Issue can be resolved by user during the interactive authentication flow. See Understanding MsalUiRequiredException for details. was used with a Prompt.Never value, however this could not be honored by the server. Please use a different prompt behavior, such as . See Understanding MsalUiRequiredException for details. An call failed. This is usually part of the pattern of calling for getting a token from the cache, followed by an a different AcquireToken call for getting a token from Microsoft Entra ID. See the error message for details. See Understanding MsalUiRequiredException for details. A string that is added to each Authorization Request and is expected to be sent back along with the authorization code. MSAL is responsible for validating that the state sent is identical to the state received. This is in addition to PKCE, which is validated by the server to ensure that the system redeeming the auth code is the same as the system who asked for it. It protects against XSRF https://openid.net/specs/openid-connect-core-1_0.html Initializes an instance for a provided caller window. Caller window. OPTIONAL. Caller UIViewController Sets the preferred status bar style for the login form view controller presented The preferred status bar style. Set the transition style used when the login form view is presented The modal transition style. Sets the presentation style used when the login form view is presented The modal presentation style. Sets a custom transitioning delegate to the login form view controller The transitioning delegate. Validates that the authorization redirects do not happen over http or other insecure protocol. This does not include the final redirect, denoted by the redirect URI. Extra validations on the redirect URI, for example system web views cannot work with the urn:oob... URI because there is no way of knowing which app to get back to. WebUIs can update the URI, for example use http://localhost:1234 instead of http://localhost. Throws, if URI is invalid. Type containing an assertion representing a user's credentials. This type is used in the On-Behalf-Of flow in confidential client applications, enabling a web API to request a token for another downstream API in the name of the user whose credentials are held by this . See https://aka.ms/msal-net-on-behalf-of Constructor from a JWT assertion. For other assertion types (SAML), use the other constructor JWT bearer token used to access the Web application itself Constructor of a UserAssertion specifying the assertionType in addition to the assertion Assertion representing the user. Type of the assertion representing the user. Accepted types are currently: urn:ietf:params:oauth:grant-type:jwt-bearerJWT bearer token. Passing this is equivalent to using the other (simpler) constructor urn:ietf:params:oauth:grant-type:saml1_1-bearerSAML 1.1 bearer token urn:ietf:params:oauth:grant-type:saml2-bearerSAML 2 bearer token Gets the assertion. Gets the assertion type. Retrieve the TenantId for an Authority URL. The Authority URL to parse. The Tenant Id The Tenant Id can be NULL if the Authority Type is ADFS Encoding table The following functions perform base64url encoding which differs from regular base64 encoding as follows * padding is skipped so the pad character '=' doesn't have to be percent encoded * the 62nd and 63rd regular base64 encoding characters ('+' and '/') are replace with ('-' and '_') The changes make the encoding alphabet file and URL safe. string to encode. Base64Url encoding of the UTF8 bytes. Converts a subset of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64-url digits. Parameters specify the subset as an offset in the input array, and the number of elements in the array to convert. An array of 8-bit unsigned integers. An offset in inArray. The number of elements of inArray to convert. The string representation in base 64 url encoding of length elements of inArray, starting at position offset. 'inArray' is null. offset or length is negative OR offset plus length is greater than the length of inArray. Converts a subset of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64-url digits. Parameters specify the subset as an offset in the input array, and the number of elements in the array to convert. An array of 8-bit unsigned integers. The string representation in base 64 url encoding of length elements of inArray, starting at position offset. 'inArray' is null. offset or length is negative OR offset plus length is greater than the length of inArray. Converts the specified string, which encodes binary data as base-64-url digits, to an equivalent 8-bit unsigned integer array. base64Url encoded string. UTF8 bytes. Decodes the string from Base64UrlEncoded to UTF8. string to decode. UTF8 string. Represents a thread-safe hash-based unique collection. The type of the items in the collection. All public members of are thread-safe and may be used concurrently from multiple threads. Based on the implementation from: https://github.com/i3arnon/ConcurrentHashSet/blob/main/src/ConcurrentHashSet/ConcurrentHashSet.cs Gets the number of items contained in the . The number of items contained in the . Count has snapshot semantics and represents the number of items in the at the moment when Count was accessed. Gets a value that indicates whether the is empty. true if the is empty; otherwise, false. Initializes a new instance of the class that is empty, has the default concurrency level, has the default initial capacity, and uses the default comparer for the item type. Initializes a new instance of the class that is empty, has the specified concurrency level and capacity, and uses the default comparer for the item type. The estimated number of threads that will update the concurrently. The initial number of elements that the can contain. is less than 1. is less than 0. Initializes a new instance of the class that contains elements copied from the specified , has the default concurrency level, has the default initial capacity, and uses the default comparer for the item type. The whose elements are copied to the new . is a null reference. Initializes a new instance of the class that is empty, has the specified concurrency level and capacity, and uses the specified . The implementation to use when comparing items. Initializes a new instance of the class that contains elements copied from the specified , has the default concurrency level, has the default initial capacity, and uses the specified . The whose elements are copied to the new . The implementation to use when comparing items. is a null reference (Nothing in Visual Basic). Initializes a new instance of the class that contains elements copied from the specified , has the specified concurrency level, has the specified initial capacity, and uses the specified . The estimated number of threads that will update the concurrently. The whose elements are copied to the new . The implementation to use when comparing items. is a null reference. is less than 1. Initializes a new instance of the class that is empty, has the specified concurrency level, has the specified initial capacity, and uses the specified . The estimated number of threads that will update the concurrently. The initial number of elements that the can contain. The implementation to use when comparing items. is less than 1. -or- is less than 0. Adds the specified item to the . The item to add. true if the items was added to the successfully; false if it already exists. The contains too many items. Removes all items from the . Determines whether the contains the specified item. The item to locate in the . true if the contains the item; otherwise, false. Attempts to remove the item from the . The item to remove. true if an item was removed successfully; otherwise, false. Returns an enumerator that iterates through the . An enumerator for the . The enumerator returned from the collection is safe to use concurrently with reads and writes to the collection, however it does not represent a moment-in-time snapshot of the collection. The contents exposed through the enumerator may contain modifications made to the collection after was called. Structure that holds a result and duration of the in milliseconds Measured milliseconds Measured microseconds Measured ticks Structure that holds a duration of the in milliseconds. Measured milliseconds Measured microseconds Measured ticks An object that either wraps a SemaphoreSlim for synchronization or ignores synchronization completely and just keeps track of Wait / Release operations. Provides functionality to automatically try the given piece of logic some number of times before re-throwing the exception. This is useful for any piece of code which may experience transient failures. Be cautious of passing code with two distinct actions given that if the second or subsequent piece of logic fails, the first will also be retried upon each retry. Copied from https://github.com/microsoft/RetryOperationHelper/blob/master/RetryOperationHelper/RetryOperationHelper.cs Executes asynchronous function with retry logic. The asynchronous function to be executed. The maximum number of attempts. Timespan to wait between attempts of the operation The callback executed when an attempt is failed. Allowed exceptions The result type. The producing the result. Executes asynchronous function with retry logic. The asynchronous function to be executed. The maximum number of attempts. Timespan to wait between attempts of the operation The retry handler. The producing the result. Singleton timer used to measure the duration tasks. Singleton stopwatch. Current elapsed milliseconds of the stopwatch Measures the duration of a code block Measures the duration of an asyncronous code block Measures the duration of an asyncronous code block Measures duration of in ticks and milliseconds. Measures duration of in ticks and milliseconds. Create an array of bytes representing the UTF-8 encoding of the given string. String to get UTF-8 bytes for Array of UTF-8 character bytes Gets the currently logged in user. Works for Windows when user is AD or AAD joined. Throws otherwise if cannot be found. Parameters returned by the WWW-Authenticate header. This allows for dynamic scenarios such as Claims challenge, Continuous Access Evaluation (CAE), and Conditional Access (CA). See https://aka.ms/msal-net/wwwAuthenticate. Resource for which to request scopes. This is the App ID URI of the API that returned the WWW-Authenticate header. Clients that perform resource validation (e.g. by comparing the host part of the resource against a list of known good hosts), can still use the indexer to retrieve the raw value of the resource / scope. If a resource is used, add "/.default" to it to transform it into a scope, e.g. "https://graph.microsoft.com/.default" is the OAuth2 scope for "https://graph.microsoft.com" resource. MSAL only works with scopes. Scopes to request. If it's not provided by the web API, it's computed from the Resource. Clients that perform resource validation (e.g. by comparing the host part of the resource against a list of known good hosts), can still use the indexer to retrieve the raw value of the resource / scope. If a resource is used, add "/.default" to it to transform it into a scope, e.g. "https://graph.microsoft.com/.default" is the OAuth2 scope for "https://graph.microsoft.com" resource. MSAL only works with scopes. Authority from which to request an access token. Claims demanded by the web API. Error. AuthScheme. See the documentation on WWW-Authenticate for more details The nonce acquired from the WWW-Authenticate header. Return the RawParameters of key . Name of the raw parameter to retrieve. The raw parameter if it exists, or throws a otherwise. Dictionary of raw parameters in the WWW-Authenticate header (extracted from the WWW-Authenticate header string value, without any processing). This allows support for APIs which are not mappable easily to the standard or framework specific (Microsoft.Identity.Model, Microsoft.Identity.Web). Gets Azure AD tenant ID. Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response. URI of the resource. WWW-Authenticate Parameters extracted from response to the unauthenticated call. Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response. URI of the resource. The cancellation token to cancel operation. WWW-Authenticate Parameters extracted from response to the unauthenticated call. Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response. Instance of to make the request with. URI of the resource. The cancellation token to cancel operation. WWW-Authenticate Parameters extracted from response to the unauthenticated call. Create WWW-Authenticate parameters from the HttpResponseHeaders. HttpResponseHeaders. Authentication scheme. Default is "Bearer". The parameters requested by the web API. Currently it only supports the Bearer scheme Creates parameters from the WWW-Authenticate string. String contained in a WWW-Authenticate header. The parameters requested by the web API. Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response. URI of the resource. Authentication scheme. The cancellation token to cancel operation. WWW-Authenticate Parameters extracted from response to the unauthenticated call. Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response. Instance of to make the request with. URI of the resource. The cancellation token to cancel operation. Authentication scheme. WWW-Authenticate Parameters extracted from response to the unauthenticated call. Create WWW-Authenticate parameters from the HttpResponseHeaders. HttpResponseHeaders. Authentication scheme. The parameters requested by the web API. Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response. URI of the resource. The cancellation token to cancel operation. WWW-Authenticate Parameters extracted from response to the unauthenticated call. Create the authenticate parameters by attempting to call the resource unauthenticated, and analyzing the response. Instance of to make the request with. URI of the resource. The cancellation token to cancel operation. WWW-Authenticate Parameters extracted from response to the unauthenticated call. Create WWW-Authenticate parameters from the HttpResponseHeaders for each auth scheme. HttpResponseHeaders. The parameters requested by the web API. Currently it only supports the Bearer scheme Gets the claim challenge from HTTP header. Used, for example, for Conditional Access (CA). The HTTP response headers. Authentication scheme. Default is Bearer. The claims challenge Creates parameters from the WWW-Authenticate string. String contained in a WWW-Authenticate header. Auth scheme of the result. The parameters requested by the web API. Checks if input is a base-64 encoded string. If it is one, decodes it to get a JSON fragment. Input string a json fragment (original input string or decoded from base64 encoded). Static class that consumes the response from the Authentication flow and continues token acquisition. This class should be called in ApplicationDelegate whenever app loads/reloads. Because this class needs to be static, we can only inject a logger from one request a time, making the correlation IDs reported unreliable in case multiple requests in parallel. Sets response for continuing authentication flow. This function will return true if the response was meant for MSAL, else it will return false. url used to invoke the application Returns if the response is from the broker app. See https://aka.ms/msal-net-ios-13-broker for more details. application bundle id of the broker True if the response is from broker, False otherwise. Sets broker response for continuing authentication flow. iOS broker communication encrypts the tokens using a symmetric algorithm. MSAL first sends the key to the broker and the broker returns an encrypted response. It is recommended to use the same key irrespective of application - the main reasons is: fewer calls from broker to AAD, because broker tokens are scoped to the key (i.e. new key -> broker cache is not hit) Handles requests which invoke the broker. This is only for mobile (iOS and Android) scenarios. iOS broker does not handle silent flow iOS broker does not handle silent flow iOS broker does not handle silent flow This class corresponds to the EnrollmentIDs entry in the Keychain FOCI has not been tested on iOS Platform / OS specific logic. No library (ADAL / MSAL) specific code should go in here. Considered PII, ensure that it is hashed. Name of the calling application Considered PII, ensure that it is hashed. Version of the calling application Considered PII. Please ensure that it is hashed. Device identifier This method is used during token cache serialization which is not supported for iOS. Represents a BSON Oid (object id). Gets or sets the value of the Oid. The value of the Oid. Initializes a new instance of the class. The Oid value. Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data. Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary. true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. Gets or sets a value indicating whether the root object will be read as a JSON array. true if the root object will be read as a JSON array; otherwise, false. Gets or sets the used when reading values from BSON. The used when reading values from BSON. Initializes a new instance of the class. The containing the BSON data to read. Initializes a new instance of the class. The containing the BSON data to read. Initializes a new instance of the class. The containing the BSON data to read. if set to true the root object will be read as a JSON array. The used when reading values from BSON. Initializes a new instance of the class. The containing the BSON data to read. if set to true the root object will be read as a JSON array. The used when reading values from BSON. Reads the next JSON token from the underlying . true if the next token was read successfully; false if there are no more tokens to read. Changes the reader's state to . If is set to true, the underlying is also closed. Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data. Gets or sets the used when writing values to BSON. When set to no conversion will occur. The used when writing values to BSON. Initializes a new instance of the class. The to write to. Initializes a new instance of the class. The to write to. Flushes whatever is in the buffer to the underlying and also flushes the underlying stream. Writes the end. The token. Writes a comment /*...*/ containing the specified text. Text to place inside the comment. Writes the start of a constructor with the given name. The name of the constructor. Writes raw JSON. The raw JSON to write. Writes raw JSON where a value is expected and updates the writer's state. The raw JSON to write. Writes the beginning of a JSON array. Writes the beginning of a JSON object. Writes the property name of a name/value pair on a JSON object. The name of the property. Closes this writer. If is set to true, the underlying is also closed. If is set to true, the JSON is auto-completed. Writes a value. An error will raised if the value cannot be written as a single JSON token. The value to write. Writes a null value. Writes an undefined value. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a [] value. The [] value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a [] value that represents a BSON object id. The Object ID value to write. Writes a BSON regex. The regex pattern. The regex options. Specifies how constructors are used when initializing objects during deserialization by the . First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor. Json.NET will use a non-public default constructor before falling back to a parameterized constructor. Converts a binary value to and from a base 64 string value. Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. The calling serializer. The object value. Determines whether this instance can convert the specified object type. Type of the object. true if this instance can convert the specified object type; otherwise, false. Converts a to and from JSON and BSON. Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. The calling serializer. The object value. Determines whether this instance can convert the specified object type. Type of the object. true if this instance can convert the specified object type; otherwise, false. Creates a custom object. The object type to convert. Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. The calling serializer. The object value. Creates an object which will then be populated by the serializer. Type of the object. The created object. Determines whether this instance can convert the specified object type. Type of the object. true if this instance can convert the specified object type; otherwise, false. Gets a value indicating whether this can write JSON. true if this can write JSON; otherwise, false. Provides a base class for converting a to and from JSON. Determines whether this instance can convert the specified object type. Type of the object. true if this instance can convert the specified object type; otherwise, false. Converts a F# discriminated union type to and from JSON. Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. The calling serializer. The object value. Determines whether this instance can convert the specified object type. Type of the object. true if this instance can convert the specified object type; otherwise, false. Converts an to and from JSON. Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. The calling serializer. The object value. Determines whether this instance can convert the specified object type. Type of the object. true if this instance can convert the specified object type; otherwise, false. Gets a value indicating whether this can write JSON. true if this can write JSON; otherwise, false. Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z"). Gets or sets the date time styles used when converting a date to and from JSON. The date time styles used when converting a date to and from JSON. Gets or sets the date time format used when converting a date to and from JSON. The date time format used when converting a date to and from JSON. Gets or sets the culture used when converting a date to and from JSON. The culture used when converting a date to and from JSON. Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. The calling serializer. The object value. Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)). Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing property value of the JSON that is being converted. The calling serializer. The object value. Converts a to and from JSON. Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. The calling serializer. The object value. Determines whether this instance can convert the specified object type. Type of the object. true if this instance can convert the specified object type; otherwise, false. Converts a to and from JSON and BSON. Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. The calling serializer. The object value. Determines whether this instance can convert the specified object type. Type of the object. true if this instance can convert the specified object type; otherwise, false. Converts an to and from its name string value. Gets or sets a value indicating whether the written enum text should be camel case. The default value is false. true if the written enum text will be camel case; otherwise, false. Gets or sets the naming strategy used to resolve how enum text is written. The naming strategy used to resolve how enum text is written. Gets or sets a value indicating whether integer values are allowed when serializing and deserializing. The default value is true. true if integers are allowed when serializing and deserializing; otherwise, false. Initializes a new instance of the class. Initializes a new instance of the class. true if the written enum text will be camel case; otherwise, false. Initializes a new instance of the class. The naming strategy used to resolve how enum text is written. true if integers are allowed when serializing and deserializing; otherwise, false. Initializes a new instance of the class. The of the used to write enum text. Initializes a new instance of the class. The of the used to write enum text. The parameter list to use when constructing the described by . If null, the default constructor is used. When non-null, there must be a constructor defined in the that exactly matches the number, order, and type of these parameters. Initializes a new instance of the class. The of the used to write enum text. The parameter list to use when constructing the described by . If null, the default constructor is used. When non-null, there must be a constructor defined in the that exactly matches the number, order, and type of these parameters. true if integers are allowed when serializing and deserializing; otherwise, false. Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. The calling serializer. The object value. Determines whether this instance can convert the specified object type. Type of the object. true if this instance can convert the specified object type; otherwise, false. Converts a to and from Unix epoch time Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing property value of the JSON that is being converted. The calling serializer. The object value. Converts a to and from a string (e.g. "1.2.3.4"). Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing property value of the JSON that is being converted. The calling serializer. The object value. Determines whether this instance can convert the specified object type. Type of the object. true if this instance can convert the specified object type; otherwise, false. Converts XML to and from JSON. Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements. The name of the deserialized root element. Gets or sets a value to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. true if the array attribute is written to the XML; otherwise, false. Gets or sets a value indicating whether to write the root JSON object. true if the JSON root object is omitted; otherwise, false. Gets or sets a value indicating whether to encode special characters when converting JSON to XML. If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify XML namespaces, attributes or processing directives. Instead special characters are encoded and written as part of the XML element name. true if special characters are encoded; otherwise, false. Writes the JSON representation of the object. The to write to. The calling serializer. The value. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. The calling serializer. The object value. Checks if the is a namespace attribute. Attribute name to test. The attribute name prefix if it has one, otherwise an empty string. true if attribute name is for a namespace attribute, otherwise false. Determines whether this instance can convert the specified value type. Type of the value. true if this instance can convert the specified value type; otherwise, false. Specifies how dates are formatted when writing JSON text. Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. Date formatted strings are not parsed to a date type and are read as strings. Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . Specifies how to treat the time value when converting between string and . Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. Treat as a UTC. If the object represents a local time, it is converted to a UTC. Treat as a local time if a is being converted to a string. If a string is being converted to , convert to a local time if a time zone is specified. Time zone information should be preserved when converting. The default JSON name table implementation. Initializes a new instance of the class. Gets a string containing the same characters as the specified range of characters in the given array. The character array containing the name to find. The zero-based index into the array specifying the first character of the name. The number of characters in the name. A string containing the same characters as the specified range of characters in the given array. Adds the specified string into name table. The string to add. This method is not thread-safe. The resolved string. Specifies default value handling options for the . Include members where the member value is the same as the member's default value when serializing objects. Included members are written to JSON. Has no effect when deserializing. Ignore members where the member value is the same as the member's default value when serializing objects so that it is not written to JSON. This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers, decimals and floating point numbers; and false for booleans). The default value ignored can be changed by placing the on the property. Members with a default value but no JSON will be set to their default value when deserializing. Ignore members where the member value is the same as the member's default value when serializing objects and set members to their default value when deserializing. Specifies float format handling options when writing special floating point numbers, e.g. , and with . Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity". Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity. Note that this will produce non-valid JSON. Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property. Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. Floating point numbers are parsed to . Floating point numbers are parsed to . Specifies formatting options for the . No special formatting is applied. This is the default. Causes child objects to be indented according to the and settings. Provides an interface for using pooled arrays. The array type content. Rent an array from the pool. This array must be returned when it is no longer needed. The minimum required length of the array. The returned array may be longer. The rented array from the pool. This array must be returned when it is no longer needed. Return an array to the pool. The array that is being returned. Provides an interface to enable a class to return line and position information. Gets a value indicating whether the class can return line information. true if and can be provided; otherwise, false. Gets the current line number. The current line number or 0 if no line information is available (for example, when returns false). Gets the current line position. The current line position or 0 if no line information is available (for example, when returns false). Instructs the how to serialize the collection. Gets or sets a value indicating whether null items are allowed in the collection. true if null items are allowed in the collection; otherwise, false. Initializes a new instance of the class. Initializes a new instance of the class with a flag indicating whether the array can contain null items. A flag indicating whether the array can contain null items. Initializes a new instance of the class with the specified container Id. The container Id. Instructs the to use the specified constructor when deserializing that object. Instructs the how to serialize the object. Gets or sets the id. The id. Gets or sets the title. The title. Gets or sets the description. The description. Gets or sets the collection's items converter. The collection's items converter. The parameter list to use when constructing the described by . If null, the default constructor is used. When non-null, there must be a constructor defined in the that exactly matches the number, order, and type of these parameters. [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] Gets or sets the of the . The of the . The parameter list to use when constructing the described by . If null, the default constructor is used. When non-null, there must be a constructor defined in the that exactly matches the number, order, and type of these parameters. [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })] Gets or sets a value that indicates whether to preserve object references. true to keep object reference; otherwise, false. The default is false. Gets or sets a value that indicates whether to preserve collection's items references. true to keep collection's items object references; otherwise, false. The default is false. Gets or sets the reference loop handling used when serializing the collection's items. The reference loop handling. Gets or sets the type name handling used when serializing the collection's items. The type name handling. Initializes a new instance of the class. Initializes a new instance of the class with the specified container Id. The container Id. Provides methods for converting between .NET types and JSON types. Gets or sets a function that creates default . Default settings are automatically used by serialization methods on , and and on . To serialize without using any default settings create a with . Represents JavaScript's boolean value true as a string. This field is read-only. Represents JavaScript's boolean value false as a string. This field is read-only. Represents JavaScript's null as a string. This field is read-only. Represents JavaScript's undefined as a string. This field is read-only. Represents JavaScript's positive infinity as a string. This field is read-only. Represents JavaScript's negative infinity as a string. This field is read-only. Represents JavaScript's NaN as a string. This field is read-only. Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation using the specified. The value to convert. The format the date will be converted to. The time zone handling when the date is converted to a string. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation using the specified. The value to convert. The format the date will be converted to. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. The string delimiter character. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. The string delimiter character. The string escape handling. A JSON string representation of the . Converts the to its JSON string representation. The value to convert. A JSON string representation of the . Serializes the specified object to a JSON string. The object to serialize. A JSON string representation of the object. Serializes the specified object to a JSON string using formatting. The object to serialize. Indicates how the output should be formatted. A JSON string representation of the object. Serializes the specified object to a JSON string using a collection of . The object to serialize. A collection of converters used while serializing. A JSON string representation of the object. Serializes the specified object to a JSON string using formatting and a collection of . The object to serialize. Indicates how the output should be formatted. A collection of converters used while serializing. A JSON string representation of the object. Serializes the specified object to a JSON string using . The object to serialize. The used to serialize the object. If this is null, default serialization settings will be used. A JSON string representation of the object. Serializes the specified object to a JSON string using a type, formatting and . The object to serialize. The used to serialize the object. If this is null, default serialization settings will be used. The type of the value being serialized. This parameter is used when is to write out the type name if the type of the value does not match. Specifying the type is optional. A JSON string representation of the object. Serializes the specified object to a JSON string using formatting and . The object to serialize. Indicates how the output should be formatted. The used to serialize the object. If this is null, default serialization settings will be used. A JSON string representation of the object. Serializes the specified object to a JSON string using a type, formatting and . The object to serialize. Indicates how the output should be formatted. The used to serialize the object. If this is null, default serialization settings will be used. The type of the value being serialized. This parameter is used when is to write out the type name if the type of the value does not match. Specifying the type is optional. A JSON string representation of the object. Deserializes the JSON to a .NET object. The JSON to deserialize. The deserialized object from the JSON string. Deserializes the JSON to a .NET object using . The JSON to deserialize. The used to deserialize the object. If this is null, default serialization settings will be used. The deserialized object from the JSON string. Deserializes the JSON to the specified .NET type. The JSON to deserialize. The of object being deserialized. The deserialized object from the JSON string. Deserializes the JSON to the specified .NET type. The type of the object to deserialize to. The JSON to deserialize. The deserialized object from the JSON string. Deserializes the JSON to the given anonymous type. The anonymous type to deserialize to. This can't be specified traditionally and must be inferred from the anonymous type passed as a parameter. The JSON to deserialize. The anonymous type object. The deserialized anonymous type from the JSON string. Deserializes the JSON to the given anonymous type using . The anonymous type to deserialize to. This can't be specified traditionally and must be inferred from the anonymous type passed as a parameter. The JSON to deserialize. The anonymous type object. The used to deserialize the object. If this is null, default serialization settings will be used. The deserialized anonymous type from the JSON string. Deserializes the JSON to the specified .NET type using a collection of . The type of the object to deserialize to. The JSON to deserialize. Converters to use while deserializing. The deserialized object from the JSON string. Deserializes the JSON to the specified .NET type using . The type of the object to deserialize to. The object to deserialize. The used to deserialize the object. If this is null, default serialization settings will be used. The deserialized object from the JSON string. Deserializes the JSON to the specified .NET type using a collection of . The JSON to deserialize. The type of the object to deserialize. Converters to use while deserializing. The deserialized object from the JSON string. Deserializes the JSON to the specified .NET type using . The JSON to deserialize. The type of the object to deserialize to. The used to deserialize the object. If this is null, default serialization settings will be used. The deserialized object from the JSON string. Populates the object with values from the JSON string. The JSON to populate values from. The target object to populate values onto. Populates the object with values from the JSON string using . The JSON to populate values from. The target object to populate values onto. The used to deserialize the object. If this is null, default serialization settings will be used. Serializes the to a JSON string. The node to serialize. A JSON string of the . Serializes the to a JSON string using formatting. The node to serialize. Indicates how the output should be formatted. A JSON string of the . Serializes the to a JSON string using formatting and omits the root object if is true. The node to serialize. Indicates how the output should be formatted. Omits writing the root object. A JSON string of the . Deserializes the from a JSON string. The JSON string. The deserialized . Deserializes the from a JSON string nested in a root element specified by . The JSON string. The name of the root element to append when deserializing. The deserialized . Deserializes the from a JSON string nested in a root element specified by and writes a Json.NET array attribute for collections. The JSON string. The name of the root element to append when deserializing. A value to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. The deserialized . Deserializes the from a JSON string nested in a root element specified by , writes a Json.NET array attribute for collections, and encodes special characters. The JSON string. The name of the root element to append when deserializing. A value to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. A value to indicate whether to encode special characters when converting JSON to XML. If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify XML namespaces, attributes or processing directives. Instead special characters are encoded and written as part of the XML element name. The deserialized . Serializes the to a JSON string. The node to convert to JSON. A JSON string of the . Serializes the to a JSON string using formatting. The node to convert to JSON. Indicates how the output should be formatted. A JSON string of the . Serializes the to a JSON string using formatting and omits the root object if is true. The node to serialize. Indicates how the output should be formatted. Omits writing the root object. A JSON string of the . Deserializes the from a JSON string. The JSON string. The deserialized . Deserializes the from a JSON string nested in a root element specified by . The JSON string. The name of the root element to append when deserializing. The deserialized . Deserializes the from a JSON string nested in a root element specified by and writes a Json.NET array attribute for collections. The JSON string. The name of the root element to append when deserializing. A value to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. The deserialized . Deserializes the from a JSON string nested in a root element specified by , writes a Json.NET array attribute for collections, and encodes special characters. The JSON string. The name of the root element to append when deserializing. A value to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. A value to indicate whether to encode special characters when converting JSON to XML. If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify XML namespaces, attributes or processing directives. Instead special characters are encoded and written as part of the XML element name. The deserialized . Converts an object to and from JSON. Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. The calling serializer. The object value. Determines whether this instance can convert the specified object type. Type of the object. true if this instance can convert the specified object type; otherwise, false. Gets a value indicating whether this can read JSON. true if this can read JSON; otherwise, false. Gets a value indicating whether this can write JSON. true if this can write JSON; otherwise, false. Converts an object to and from JSON. The object type to convert. Writes the JSON representation of the object. The to write to. The value. The calling serializer. Writes the JSON representation of the object. The to write to. The value. The calling serializer. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. The calling serializer. The object value. Reads the JSON representation of the object. The to read from. Type of the object. The existing value of object being read. If there is no existing value then null will be used. The existing value has a value. The calling serializer. The object value. Determines whether this instance can convert the specified object type. Type of the object. true if this instance can convert the specified object type; otherwise, false. Instructs the to use the specified when serializing the member or class. Gets the of the . The of the . The parameter list to use when constructing the described by . If null, the default constructor is used. Initializes a new instance of the class. Type of the . Initializes a new instance of the class. Type of the . Parameter list to use when constructing the . Can be null. Represents a collection of . Instructs the how to serialize the collection. Initializes a new instance of the class. Initializes a new instance of the class with the specified container Id. The container Id. The exception thrown when an error occurs during JSON serialization or deserialization. Initializes a new instance of the class. Initializes a new instance of the class with a specified error message. The error message that explains the reason for the exception. Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or null if no inner exception is specified. Instructs the to deserialize properties with no matching class member into the specified collection and write values during serialization. Gets or sets a value that indicates whether to write extension data when serializing the object. true to write extension data when serializing the object; otherwise, false. The default is true. Gets or sets a value that indicates whether to read extension data when deserializing the object. true to read extension data when deserializing the object; otherwise, false. The default is true. Initializes a new instance of the class. Instructs the not to serialize the public field or public read/write property value. Base class for a table of atomized string objects. Gets a string containing the same characters as the specified range of characters in the given array. The character array containing the name to find. The zero-based index into the array specifying the first character of the name. The number of characters in the name. A string containing the same characters as the specified range of characters in the given array. Instructs the how to serialize the object. Gets or sets the member serialization. The member serialization. Gets or sets the missing member handling used when deserializing this object. The missing member handling. Gets or sets how the object's properties with null values are handled during serialization and deserialization. How the object's properties with null values are handled during serialization and deserialization. Gets or sets a value that indicates whether the object's properties are required. A value indicating whether the object's properties are required. Initializes a new instance of the class. Initializes a new instance of the class with the specified member serialization. The member serialization. Initializes a new instance of the class with the specified container Id. The container Id. Instructs the to always serialize the member with the specified name. Gets or sets the type used when serializing the property's collection items. The collection's items type. The parameter list to use when constructing the described by . If null, the default constructor is used. When non-null, there must be a constructor defined in the that exactly matches the number, order, and type of these parameters. [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] Gets or sets the of the . The of the . The parameter list to use when constructing the described by . If null, the default constructor is used. When non-null, there must be a constructor defined in the that exactly matches the number, order, and type of these parameters. [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })] Gets or sets the null value handling used when serializing this property. The null value handling. Gets or sets the default value handling used when serializing this property. The default value handling. Gets or sets the reference loop handling used when serializing this property. The reference loop handling. Gets or sets the object creation handling used when deserializing this property. The object creation handling. Gets or sets the type name handling used when serializing this property. The type name handling. Gets or sets whether this property's value is serialized as a reference. Whether this property's value is serialized as a reference. Gets or sets the order of serialization of a member. The numeric order of serialization. Gets or sets a value indicating whether this property is required. A value indicating whether this property is required. Gets or sets the name of the property. The name of the property. Gets or sets the reference loop handling used when serializing the property's collection items. The collection's items reference loop handling. Gets or sets the type name handling used when serializing the property's collection items. The collection's items type name handling. Gets or sets whether this property's collection items are serialized as a reference. Whether this property's collection items are serialized as a reference. Initializes a new instance of the class. Initializes a new instance of the class with the specified name. Name of the property. Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. Asynchronously reads the next JSON token from the source. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns true if the next token was read successfully; false if there are no more tokens to read. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously skips the children of the current token. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously reads the next JSON token from the source as a of . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the of . This result will be null at the end of an array. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously reads the next JSON token from the source as a []. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the []. This result will be null at the end of an array. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously reads the next JSON token from the source as a of . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the of . This result will be null at the end of an array. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously reads the next JSON token from the source as a of . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the of . This result will be null at the end of an array. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously reads the next JSON token from the source as a of . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the of . This result will be null at the end of an array. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously reads the next JSON token from the source as a of . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the of . This result will be null at the end of an array. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously reads the next JSON token from the source as a of . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the of . This result will be null at the end of an array. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously reads the next JSON token from the source as a . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the . This result will be null at the end of an array. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Specifies the state of the reader. A read method has not been called. The end of the file has been reached successfully. Reader is at a property. Reader is at the start of an object. Reader is in an object. Reader is at the start of an array. Reader is in an array. The method has been called. Reader has just read a value. Reader is at the start of a constructor. Reader is in a constructor. An error occurred that prevents the read operation from continuing. The end of the file has been reached successfully. Gets the current reader state. The current reader state. Gets or sets a value indicating whether the source should be closed when this reader is closed. true to close the source when this reader is closed; otherwise false. The default is true. Gets or sets a value indicating whether multiple pieces of JSON content can be read from a continuous stream without erroring. true to support reading multiple pieces of JSON content; otherwise false. The default is false. Gets the quotation mark character used to enclose the value of a string. Gets or sets how time zones are handled when reading JSON. Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. Gets or sets how custom date formatted strings are parsed when reading JSON. Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . A null value means there is no maximum. The default value is 128. Gets the type of the current JSON token. Gets the text value of the current JSON token. Gets the .NET type for the current JSON token. Gets the depth of the current token in the JSON document. The depth of the current token in the JSON document. Gets the path of the current JSON token. Gets or sets the culture used when reading JSON. Defaults to . Initializes a new instance of the class. Reads the next JSON token from the source. true if the next token was read successfully; false if there are no more tokens to read. Reads the next JSON token from the source as a of . A of . This method will return null at the end of an array. Reads the next JSON token from the source as a . A . This method will return null at the end of an array. Reads the next JSON token from the source as a []. A [] or null if the next JSON token is null. This method will return null at the end of an array. Reads the next JSON token from the source as a of . A of . This method will return null at the end of an array. Reads the next JSON token from the source as a of . A of . This method will return null at the end of an array. Reads the next JSON token from the source as a of . A of . This method will return null at the end of an array. Reads the next JSON token from the source as a of . A of . This method will return null at the end of an array. Reads the next JSON token from the source as a of . A of . This method will return null at the end of an array. Skips the children of the current token. Sets the current token. The new token. Sets the current token and value. The new token. The value. Sets the current token and value. The new token. The value. A flag indicating whether the position index inside an array should be updated. Sets the state based on current token type. Releases unmanaged and - optionally - managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Changes the reader's state to . If is set to true, the source is also closed. The exception thrown when an error occurs while reading JSON text. Gets the line number indicating where the error occurred. The line number indicating where the error occurred. Gets the line position indicating where the error occurred. The line position indicating where the error occurred. Gets the path to the JSON where the error occurred. The path to the JSON where the error occurred. Initializes a new instance of the class. Initializes a new instance of the class with a specified error message. The error message that explains the reason for the exception. Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or null if no inner exception is specified. Initializes a new instance of the class with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The path to the JSON where the error occurred. The line number indicating where the error occurred. The line position indicating where the error occurred. The exception that is the cause of the current exception, or null if no inner exception is specified. Instructs the to always serialize the member, and to require that the member has a value. The exception thrown when an error occurs during JSON serialization or deserialization. Gets the line number indicating where the error occurred. The line number indicating where the error occurred. Gets the line position indicating where the error occurred. The line position indicating where the error occurred. Gets the path to the JSON where the error occurred. The path to the JSON where the error occurred. Initializes a new instance of the class. Initializes a new instance of the class with a specified error message. The error message that explains the reason for the exception. Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or null if no inner exception is specified. Initializes a new instance of the class with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The path to the JSON where the error occurred. The line number indicating where the error occurred. The line position indicating where the error occurred. The exception that is the cause of the current exception, or null if no inner exception is specified. Serializes and deserializes objects into and from the JSON format. The enables you to control how objects are encoded into JSON. Occurs when the errors during serialization and deserialization. Gets or sets the used by the serializer when resolving references. Gets or sets the used by the serializer when resolving type names. Gets or sets the used by the serializer when resolving type names. Gets or sets the used by the serializer when writing trace messages. The trace writer. Gets or sets the equality comparer used by the serializer when comparing references. The equality comparer. Gets or sets how type name writing and reading is handled by the serializer. The default value is . should be used with caution when your application deserializes JSON from an external source. Incoming types should be validated with a custom when deserializing with a value other than . Gets or sets how a type name assembly is written and resolved by the serializer. The default value is . The type name assembly format. Gets or sets how a type name assembly is written and resolved by the serializer. The default value is . The type name assembly format. Gets or sets how object references are preserved by the serializer. The default value is . Gets or sets how reference loops (e.g. a class referencing itself) is handled. The default value is . Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. The default value is . Gets or sets how null values are handled during serialization and deserialization. The default value is . Gets or sets how default values are handled during serialization and deserialization. The default value is . Gets or sets how objects are created during deserialization. The default value is . The object creation handling. Gets or sets how constructors are used during deserialization. The default value is . The constructor handling. Gets or sets how metadata properties are used during deserialization. The default value is . The metadata properties handling. Gets a collection that will be used during serialization. Collection that will be used during serialization. Gets or sets the contract resolver used by the serializer when serializing .NET objects to JSON and vice versa. Gets or sets the used by the serializer when invoking serialization callback methods. The context. Indicates how JSON text output is formatted. The default value is . Gets or sets how dates are written to JSON text. The default value is . Gets or sets how time zones are handled during serialization and deserialization. The default value is . Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. The default value is . Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. The default value is . Gets or sets how special floating point numbers, e.g. , and , are written as JSON text. The default value is . Gets or sets how strings are escaped when writing JSON text. The default value is . Gets or sets how and values are formatted when writing JSON text, and the expected date format when reading JSON text. The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK". Gets or sets the culture used when reading JSON. The default value is . Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . A null value means there is no maximum. The default value is 128. Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. The default value is false. true if there will be a check for additional JSON content after deserializing an object; otherwise, false. Initializes a new instance of the class. Creates a new instance. The will not use default settings from . A new instance. The will not use default settings from . Creates a new instance using the specified . The will not use default settings from . The settings to be applied to the . A new instance using the specified . The will not use default settings from . Creates a new instance. The will use default settings from . A new instance. The will use default settings from . Creates a new instance using the specified . The will use default settings from as well as the specified . The settings to be applied to the . A new instance using the specified . The will use default settings from as well as the specified . Populates the JSON values onto the target object. The that contains the JSON structure to read values from. The target object to populate values onto. Populates the JSON values onto the target object. The that contains the JSON structure to read values from. The target object to populate values onto. Deserializes the JSON structure contained by the specified . The that contains the JSON structure to deserialize. The being deserialized. Deserializes the JSON structure contained by the specified into an instance of the specified type. The containing the object. The of object being deserialized. The instance of being deserialized. Deserializes the JSON structure contained by the specified into an instance of the specified type. The containing the object. The type of the object to deserialize. The instance of being deserialized. Deserializes the JSON structure contained by the specified into an instance of the specified type. The containing the object. The of object being deserialized. The instance of being deserialized. Serializes the specified and writes the JSON structure using the specified . The used to write the JSON structure. The to serialize. Serializes the specified and writes the JSON structure using the specified . The used to write the JSON structure. The to serialize. The type of the value being serialized. This parameter is used when is to write out the type name if the type of the value does not match. Specifying the type is optional. Serializes the specified and writes the JSON structure using the specified . The used to write the JSON structure. The to serialize. The type of the value being serialized. This parameter is used when is Auto to write out the type name if the type of the value does not match. Specifying the type is optional. Serializes the specified and writes the JSON structure using the specified . The used to write the JSON structure. The to serialize. Specifies the settings on a object. Gets or sets how reference loops (e.g. a class referencing itself) are handled. The default value is . Reference loop handling. Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. The default value is . Missing member handling. Gets or sets how objects are created during deserialization. The default value is . The object creation handling. Gets or sets how null values are handled during serialization and deserialization. The default value is . Null value handling. Gets or sets how default values are handled during serialization and deserialization. The default value is . The default value handling. Gets or sets a collection that will be used during serialization. The converters. Gets or sets how object references are preserved by the serializer. The default value is . The preserve references handling. Gets or sets how type name writing and reading is handled by the serializer. The default value is . should be used with caution when your application deserializes JSON from an external source. Incoming types should be validated with a custom when deserializing with a value other than . The type name handling. Gets or sets how metadata properties are used during deserialization. The default value is . The metadata properties handling. Gets or sets how a type name assembly is written and resolved by the serializer. The default value is . The type name assembly format. Gets or sets how a type name assembly is written and resolved by the serializer. The default value is . The type name assembly format. Gets or sets how constructors are used during deserialization. The default value is . The constructor handling. Gets or sets the contract resolver used by the serializer when serializing .NET objects to JSON and vice versa. The contract resolver. Gets or sets the equality comparer used by the serializer when comparing references. The equality comparer. Gets or sets the used by the serializer when resolving references. The reference resolver. Gets or sets a function that creates the used by the serializer when resolving references. A function that creates the used by the serializer when resolving references. Gets or sets the used by the serializer when writing trace messages. The trace writer. Gets or sets the used by the serializer when resolving type names. The binder. Gets or sets the used by the serializer when resolving type names. The binder. Gets or sets the error handler called during serialization and deserialization. The error handler called during serialization and deserialization. Gets or sets the used by the serializer when invoking serialization callback methods. The context. Gets or sets how and values are formatted when writing JSON text, and the expected date format when reading JSON text. The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK". Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . A null value means there is no maximum. The default value is 128. Indicates how JSON text output is formatted. The default value is . Gets or sets how dates are written to JSON text. The default value is . Gets or sets how time zones are handled during serialization and deserialization. The default value is . Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. The default value is . Gets or sets how special floating point numbers, e.g. , and , are written as JSON. The default value is . Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. The default value is . Gets or sets how strings are escaped when writing JSON text. The default value is . Gets or sets the culture used when reading JSON. The default value is . Gets a value indicating whether there will be a check for additional content after deserializing an object. The default value is false. true if there will be a check for additional content after deserializing an object; otherwise, false. Initializes a new instance of the class. Represents a reader that provides fast, non-cached, forward-only access to JSON text data. Asynchronously reads the next JSON token from the source. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns true if the next token was read successfully; false if there are no more tokens to read. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously reads the next JSON token from the source as a of . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the of . This result will be null at the end of an array. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously reads the next JSON token from the source as a []. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the []. This result will be null at the end of an array. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously reads the next JSON token from the source as a of . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the of . This result will be null at the end of an array. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously reads the next JSON token from the source as a of . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the of . This result will be null at the end of an array. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously reads the next JSON token from the source as a of . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the of . This result will be null at the end of an array. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously reads the next JSON token from the source as a of . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the of . This result will be null at the end of an array. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously reads the next JSON token from the source as a of . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the of . This result will be null at the end of an array. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously reads the next JSON token from the source as a . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous read. The property returns the . This result will be null at the end of an array. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Initializes a new instance of the class with the specified . The containing the JSON data to read. Gets or sets the reader's property name table. Gets or sets the reader's character buffer pool. Reads the next JSON token from the underlying . true if the next token was read successfully; false if there are no more tokens to read. Reads the next JSON token from the underlying as a of . A of . This method will return null at the end of an array. Reads the next JSON token from the underlying as a of . A of . This method will return null at the end of an array. Reads the next JSON token from the underlying as a . A . This method will return null at the end of an array. Reads the next JSON token from the underlying as a []. A [] or null if the next JSON token is null. This method will return null at the end of an array. Reads the next JSON token from the underlying as a of . A of . This method will return null at the end of an array. Reads the next JSON token from the underlying as a of . A of . This method will return null at the end of an array. Reads the next JSON token from the underlying as a of . A of . This method will return null at the end of an array. Reads the next JSON token from the underlying as a of . A of . This method will return null at the end of an array. Changes the reader's state to . If is set to true, the underlying is also closed. Gets a value indicating whether the class can return line information. true if and can be provided; otherwise, false. Gets the current line number. The current line number or 0 if no line information is available (for example, returns false). Gets the current line position. The current line position or 0 if no line information is available (for example, returns false). Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes the JSON value delimiter. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes the specified end token. The end token to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously closes this writer. If is set to true, the destination is also closed. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes the end of the current JSON object or array. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes indent characters. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes an indent space. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes raw JSON without changing the writer's state. The raw JSON to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a null value. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes the property name of a name/value pair of a JSON object. The name of the property. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes the property name of a name/value pair of a JSON object. The name of the property. A flag to indicate whether the text should be escaped when it is written as a JSON property name. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes the beginning of a JSON array. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes the beginning of a JSON object. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes the start of a constructor with the given name. The name of the constructor. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes an undefined value. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes the given white space. The string of white space characters. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a [] value. The [] value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes a comment /*...*/ containing the specified text. Text to place inside the comment. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes the end of an array. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes the end of a constructor. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes the end of a JSON object. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Asynchronously writes raw JSON where a value is expected and updates the writer's state. The raw JSON to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. Derived classes must override this method to get asynchronous behaviour. Otherwise it will execute synchronously, returning an already-completed task. Gets or sets the writer's character array pool. Gets or sets how many s to write for each level in the hierarchy when is set to . Gets or sets which character to use to quote attribute values. Gets or sets which character to use for indenting when is set to . Gets or sets a value indicating whether object names will be surrounded with quotes. Initializes a new instance of the class using the specified . The to write to. Flushes whatever is in the buffer to the underlying and also flushes the underlying . Closes this writer. If is set to true, the underlying is also closed. If is set to true, the JSON is auto-completed. Writes the beginning of a JSON object. Writes the beginning of a JSON array. Writes the start of a constructor with the given name. The name of the constructor. Writes the specified end token. The end token to write. Writes the property name of a name/value pair on a JSON object. The name of the property. Writes the property name of a name/value pair on a JSON object. The name of the property. A flag to indicate whether the text should be escaped when it is written as a JSON property name. Writes indent characters. Writes the JSON value delimiter. Writes an indent space. Writes a value. An error will raised if the value cannot be written as a single JSON token. The value to write. Writes a null value. Writes an undefined value. Writes raw JSON. The raw JSON to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a of value. The of value to write. Writes a value. The value to write. Writes a of value. The of value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a [] value. The [] value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a comment /*...*/ containing the specified text. Text to place inside the comment. Writes the given white space. The string of white space characters. Specifies the type of JSON token. This is returned by the if a read method has not been called. An object start token. An array start token. A constructor start token. An object property name. A comment. Raw JSON. An integer. A float. A string. A boolean. A null token. An undefined token. An object end token. An array end token. A constructor end token. A Date. Byte data. Represents a reader that provides validation. JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. Sets an event handler for receiving schema validation errors. Gets the text value of the current JSON token. Gets the depth of the current token in the JSON document. The depth of the current token in the JSON document. Gets the path of the current JSON token. Gets the quotation mark character used to enclose the value of a string. Gets the type of the current JSON token. Gets the .NET type for the current JSON token. Initializes a new instance of the class that validates the content returned from the given . The to read from while validating. Gets or sets the schema. The schema. Gets the used to construct this . The specified in the constructor. Changes the reader's state to . If is set to true, the underlying is also closed. Reads the next JSON token from the underlying as a of . A of . Reads the next JSON token from the underlying as a []. A [] or null if the next JSON token is null. Reads the next JSON token from the underlying as a of . A of . Reads the next JSON token from the underlying as a of . A of . Reads the next JSON token from the underlying as a of . A of . Reads the next JSON token from the underlying as a . A . This method will return null at the end of an array. Reads the next JSON token from the underlying as a of . A of . This method will return null at the end of an array. Reads the next JSON token from the underlying as a of . A of . Reads the next JSON token from the underlying . true if the next token was read successfully; false if there are no more tokens to read. Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. Asynchronously closes this writer. If is set to true, the destination is also closed. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the specified end token. The end token to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes indent characters. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the JSON value delimiter. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes an indent space. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes raw JSON without changing the writer's state. The raw JSON to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the end of the current JSON object or array. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the end of an array. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the end of a constructor. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the end of a JSON object. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a null value. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the property name of a name/value pair of a JSON object. The name of the property. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the property name of a name/value pair of a JSON object. The name of the property. A flag to indicate whether the text should be escaped when it is written as a JSON property name. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the beginning of a JSON array. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a comment /*...*/ containing the specified text. Text to place inside the comment. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes raw JSON where a value is expected and updates the writer's state. The raw JSON to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the start of a constructor with the given name. The name of the constructor. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the beginning of a JSON object. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the current token. The to read the token from. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the current token. The to read the token from. A flag indicating whether the current token's children should be written. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the token and its value. The to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the token and its value. The to write. The value to write. A value is only required for tokens that have an associated value, e.g. the property name for . null can be passed to the method for tokens that don't have a value, e.g. . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a [] value. The [] value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a value. The value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes a of value. The of value to write. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes an undefined value. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously writes the given white space. The string of white space characters. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Asynchronously ets the state of the . The being written. The value being written. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous operation. The default behaviour is to execute synchronously, returning an already-completed task. Derived classes can override this behaviour for true asynchronicity. Gets or sets a value indicating whether the destination should be closed when this writer is closed. true to close the destination when this writer is closed; otherwise false. The default is true. Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed. true to auto-complete the JSON when this writer is closed; otherwise false. The default is true. Gets the top. The top. Gets the state of the writer. Gets the path of the writer. Gets or sets a value indicating how JSON text output should be formatted. Gets or sets how dates are written to JSON text. Gets or sets how time zones are handled when writing JSON text. Gets or sets how strings are escaped when writing JSON text. Gets or sets how special floating point numbers, e.g. , and , are written to JSON text. Gets or sets how and values are formatted when writing JSON text. Gets or sets the culture used when writing JSON. Defaults to . Initializes a new instance of the class. Flushes whatever is in the buffer to the destination and also flushes the destination. Closes this writer. If is set to true, the destination is also closed. If is set to true, the JSON is auto-completed. Writes the beginning of a JSON object. Writes the end of a JSON object. Writes the beginning of a JSON array. Writes the end of an array. Writes the start of a constructor with the given name. The name of the constructor. Writes the end constructor. Writes the property name of a name/value pair of a JSON object. The name of the property. Writes the property name of a name/value pair of a JSON object. The name of the property. A flag to indicate whether the text should be escaped when it is written as a JSON property name. Writes the end of the current JSON object or array. Writes the current token and its children. The to read the token from. Writes the current token. The to read the token from. A flag indicating whether the current token's children should be written. Writes the token and its value. The to write. The value to write. A value is only required for tokens that have an associated value, e.g. the property name for . null can be passed to the method for tokens that don't have a value, e.g. . Writes the token. The to write. Writes the specified end token. The end token to write. Writes indent characters. Writes the JSON value delimiter. Writes an indent space. Writes a null value. Writes an undefined value. Writes raw JSON without changing the writer's state. The raw JSON to write. Writes raw JSON where a value is expected and updates the writer's state. The raw JSON to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a of value. The of value to write. Writes a [] value. The [] value to write. Writes a value. The value to write. Writes a value. An error will raised if the value cannot be written as a single JSON token. The value to write. Writes a comment /*...*/ containing the specified text. Text to place inside the comment. Writes the given white space. The string of white space characters. Releases unmanaged and - optionally - managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Sets the state of the . The being written. The value being written. The exception thrown when an error occurs while writing JSON text. Gets the path to the JSON where the error occurred. The path to the JSON where the error occurred. Initializes a new instance of the class. Initializes a new instance of the class with a specified error message. The error message that explains the reason for the exception. Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or null if no inner exception is specified. Initializes a new instance of the class with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The path to the JSON where the error occurred. The exception that is the cause of the current exception, or null if no inner exception is specified. Specifies how JSON comments are handled when loading JSON. Ignore comments. Load comments as a with type . Specifies how duplicate property names are handled when loading JSON. Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used. Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used. Throw a when a duplicate property is encountered. Contains the LINQ to JSON extension methods. Returns a collection of tokens that contains the ancestors of every token in the source collection. The type of the objects in source, constrained to . An of that contains the source collection. An of that contains the ancestors of every token in the source collection. Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection. The type of the objects in source, constrained to . An of that contains the source collection. An of that contains every token in the source collection, the ancestors of every token in the source collection. Returns a collection of tokens that contains the descendants of every token in the source collection. The type of the objects in source, constrained to . An of that contains the source collection. An of that contains the descendants of every token in the source collection. Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection. The type of the objects in source, constrained to . An of that contains the source collection. An of that contains every token in the source collection, and the descendants of every token in the source collection. Returns a collection of child properties of every object in the source collection. An of that contains the source collection. An of that contains the properties of every object in the source collection. Returns a collection of child values of every object in the source collection with the given key. An of that contains the source collection. The token key. An of that contains the values of every token in the source collection with the given key. Returns a collection of child values of every object in the source collection. An of that contains the source collection. An of that contains the values of every token in the source collection. Returns a collection of converted child values of every object in the source collection with the given key. The type to convert the values to. An of that contains the source collection. The token key. An that contains the converted values of every token in the source collection with the given key. Returns a collection of converted child values of every object in the source collection. The type to convert the values to. An of that contains the source collection. An that contains the converted values of every token in the source collection. Converts the value. The type to convert the value to. A cast as a of . A converted value. Converts the value. The source collection type. The type to convert the value to. A cast as a of . A converted value. Returns a collection of child tokens of every array in the source collection. The source collection type. An of that contains the source collection. An of that contains the values of every token in the source collection. Returns a collection of converted child tokens of every array in the source collection. An of that contains the source collection. The type to convert the values to. The source collection type. An that contains the converted values of every token in the source collection. Returns the input typed as . An of that contains the source collection. The input typed as . Returns the input typed as . The source collection type. An of that contains the source collection. The input typed as . Represents a collection of objects. The type of token. Gets the of with the specified key. Represents a JSON array. Writes this token to a asynchronously. A into which this method will write. The token to monitor for cancellation requests. A collection of which will be used when writing the token. A that represents the asynchronous write operation. Asynchronously loads a from a . A that will be read for the content of the . If this is null, default load settings will be used. The token to monitor for cancellation requests. The default value is . A representing the asynchronous load. The property contains the JSON that was read from the specified . Asynchronously loads a from a . A that will be read for the content of the . The used to load the JSON. If this is null, default load settings will be used. The token to monitor for cancellation requests. The default value is . A representing the asynchronous load. The property contains the JSON that was read from the specified . Gets the container's children tokens. The container's children tokens. Gets the node type for this . The type. Initializes a new instance of the class. Initializes a new instance of the class from another object. A object to copy from. Initializes a new instance of the class with the specified content. The contents of the array. Initializes a new instance of the class with the specified content. The contents of the array. Loads an from a . A that will be read for the content of the . A that contains the JSON that was read from the specified . Loads an from a . A that will be read for the content of the . The used to load the JSON. If this is null, default load settings will be used. A that contains the JSON that was read from the specified . Load a from a string that contains JSON. A that contains JSON. A populated from the string that contains JSON. Load a from a string that contains JSON. A that contains JSON. The used to load the JSON. If this is null, default load settings will be used. A populated from the string that contains JSON. Creates a from an object. The object that will be used to create . A with the values of the specified object. Creates a from an object. The object that will be used to create . The that will be used to read the object. A with the values of the specified object. Writes this token to a . A into which this method will write. A collection of which will be used when writing the token. Gets the with the specified key. The with the specified key. Gets or sets the at the specified index. Determines the index of a specific item in the . The object to locate in the . The index of if found in the list; otherwise, -1. Inserts an item to the at the specified index. The zero-based index at which should be inserted. The object to insert into the . is not a valid index in the . Removes the item at the specified index. The zero-based index of the item to remove. is not a valid index in the . Returns an enumerator that iterates through the collection. A of that can be used to iterate through the collection. Adds an item to the . The object to add to the . Removes all items from the . Determines whether the contains a specific value. The object to locate in the . true if is found in the ; otherwise, false. Copies the elements of the to an array, starting at a particular array index. The array. Index of the array. Gets a value indicating whether the is read-only. true if the is read-only; otherwise, false. Removes the first occurrence of a specific object from the . The object to remove from the . true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . Represents a JSON constructor. Writes this token to a asynchronously. A into which this method will write. The token to monitor for cancellation requests. A collection of which will be used when writing the token. A that represents the asynchronous write operation. Asynchronously loads a from a . A that will be read for the content of the . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous load. The property returns a that contains the JSON that was read from the specified . Asynchronously loads a from a . A that will be read for the content of the . The used to load the JSON. If this is null, default load settings will be used. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous load. The property returns a that contains the JSON that was read from the specified . Gets the container's children tokens. The container's children tokens. Gets or sets the name of this constructor. The constructor name. Gets the node type for this . The type. Initializes a new instance of the class. Initializes a new instance of the class from another object. A object to copy from. Initializes a new instance of the class with the specified name and content. The constructor name. The contents of the constructor. Initializes a new instance of the class with the specified name and content. The constructor name. The contents of the constructor. Initializes a new instance of the class with the specified name. The constructor name. Writes this token to a . A into which this method will write. A collection of which will be used when writing the token. Gets the with the specified key. The with the specified key. Loads a from a . A that will be read for the content of the . A that contains the JSON that was read from the specified . Loads a from a . A that will be read for the content of the . The used to load the JSON. If this is null, default load settings will be used. A that contains the JSON that was read from the specified . Represents a token that can contain other tokens. Occurs when the items list of the collection has changed, or the collection is reset. Gets the container's children tokens. The container's children tokens. Raises the event. The instance containing the event data. Gets a value indicating whether this token has child tokens. true if this token has child values; otherwise, false. Get the first child token of this token. A containing the first child token of the . Get the last child token of this token. A containing the last child token of the . Returns a collection of the child tokens of this token, in document order. An of containing the child tokens of this , in document order. Returns a collection of the child values of this token, in document order. The type to convert the values to. A containing the child values of this , in document order. Returns a collection of the descendant tokens for this token in document order. An of containing the descendant tokens of the . Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order. An of containing this token, and all the descendant tokens of the . Adds the specified content as children of this . The content to be added. Adds the specified content as the first children of this . The content to be added. Creates a that can be used to add tokens to the . A that is ready to have content written to it. Replaces the child nodes of this token with the specified content. The content. Removes the child nodes from this token. Merge the specified content into this . The content to be merged. Merge the specified content into this using . The content to be merged. The used to merge the content. Gets the count of child JSON tokens. The count of child JSON tokens. Represents a collection of objects. The type of token. An empty collection of objects. Initializes a new instance of the struct. The enumerable. Returns an enumerator that can be used to iterate through the collection. A that can be used to iterate through the collection. Gets the of with the specified key. Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. Determines whether the specified is equal to this instance. The to compare with this instance. true if the specified is equal to this instance; otherwise, false. Returns a hash code for this instance. A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. Represents a JSON object. Writes this token to a asynchronously. A into which this method will write. The token to monitor for cancellation requests. A collection of which will be used when writing the token. A that represents the asynchronous write operation. Asynchronously loads a from a . A that will be read for the content of the . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous load. The property returns a that contains the JSON that was read from the specified . Asynchronously loads a from a . A that will be read for the content of the . The used to load the JSON. If this is null, default load settings will be used. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous load. The property returns a that contains the JSON that was read from the specified . Gets the container's children tokens. The container's children tokens. Occurs when a property value changes. Occurs when a property value is changing. Initializes a new instance of the class. Initializes a new instance of the class from another object. A object to copy from. Initializes a new instance of the class with the specified content. The contents of the object. Initializes a new instance of the class with the specified content. The contents of the object. Gets the node type for this . The type. Gets an of of this object's properties. An of of this object's properties. Gets a with the specified name. The property name. A with the specified name or null. Gets the with the specified name. The exact name will be searched for first and if no matching property is found then the will be used to match a property. The property name. One of the enumeration values that specifies how the strings will be compared. A matched with the specified name or null. Gets a of of this object's property values. A of of this object's property values. Gets the with the specified key. The with the specified key. Gets or sets the with the specified property name. Loads a from a . A that will be read for the content of the . A that contains the JSON that was read from the specified . is not valid JSON. Loads a from a . A that will be read for the content of the . The used to load the JSON. If this is null, default load settings will be used. A that contains the JSON that was read from the specified . is not valid JSON. Load a from a string that contains JSON. A that contains JSON. A populated from the string that contains JSON. is not valid JSON. Load a from a string that contains JSON. A that contains JSON. The used to load the JSON. If this is null, default load settings will be used. A populated from the string that contains JSON. is not valid JSON. Creates a from an object. The object that will be used to create . A with the values of the specified object. Creates a from an object. The object that will be used to create . The that will be used to read the object. A with the values of the specified object. Writes this token to a . A into which this method will write. A collection of which will be used when writing the token. Gets the with the specified property name. Name of the property. The with the specified property name. Gets the with the specified property name. The exact property name will be searched for first and if no matching property is found then the will be used to match a property. Name of the property. One of the enumeration values that specifies how the strings will be compared. The with the specified property name. Tries to get the with the specified property name. The exact property name will be searched for first and if no matching property is found then the will be used to match a property. Name of the property. The value. One of the enumeration values that specifies how the strings will be compared. true if a value was successfully retrieved; otherwise, false. Adds the specified property name. Name of the property. The value. Determines whether the JSON object has the specified property name. Name of the property. true if the JSON object has the specified property name; otherwise, false. Removes the property with the specified name. Name of the property. true if item was successfully removed; otherwise, false. Tries to get the with the specified property name. Name of the property. The value. true if a value was successfully retrieved; otherwise, false. Returns an enumerator that can be used to iterate through the collection. A that can be used to iterate through the collection. Raises the event with the provided arguments. Name of the property. Raises the event with the provided arguments. Name of the property. Returns the responsible for binding operations performed on this object. The expression tree representation of the runtime value. The to bind this object. Represents a JSON property. Writes this token to a asynchronously. A into which this method will write. The token to monitor for cancellation requests. A collection of which will be used when writing the token. A that represents the asynchronous write operation. Asynchronously loads a from a . A that will be read for the content of the . The token to monitor for cancellation requests. The default value is . A representing the asynchronous creation. The property returns a that contains the JSON that was read from the specified . Asynchronously loads a from a . A that will be read for the content of the . The used to load the JSON. If this is null, default load settings will be used. The token to monitor for cancellation requests. The default value is . A representing the asynchronous creation. The property returns a that contains the JSON that was read from the specified . Gets the container's children tokens. The container's children tokens. Gets the property name. The property name. Gets or sets the property value. The property value. Initializes a new instance of the class from another object. A object to copy from. Gets the node type for this . The type. Initializes a new instance of the class. The property name. The property content. Initializes a new instance of the class. The property name. The property content. Writes this token to a . A into which this method will write. A collection of which will be used when writing the token. Loads a from a . A that will be read for the content of the . A that contains the JSON that was read from the specified . Loads a from a . A that will be read for the content of the . The used to load the JSON. If this is null, default load settings will be used. A that contains the JSON that was read from the specified . Represents a raw JSON string. Asynchronously creates an instance of with the content of the reader's current token. The reader. The token to monitor for cancellation requests. The default value is . A representing the asynchronous creation. The property returns an instance of with the content of the reader's current token. Initializes a new instance of the class from another object. A object to copy from. Initializes a new instance of the class. The raw json. Creates an instance of with the content of the reader's current token. The reader. An instance of with the content of the reader's current token. Specifies the settings used when loading JSON. Initializes a new instance of the class. Gets or sets how JSON comments are handled when loading JSON. The default value is . The JSON comment handling. Gets or sets how JSON line info is handled when loading JSON. The default value is . The JSON line info handling. Gets or sets how duplicate property names in JSON objects are handled when loading JSON. The default value is . The JSON duplicate property name handling. Specifies the settings used when merging JSON. Initializes a new instance of the class. Gets or sets the method used when merging JSON arrays. The method used when merging JSON arrays. Gets or sets how null value properties are merged. How null value properties are merged. Gets or sets the comparison used to match property names while merging. The exact property name will be searched for first and if no matching property is found then the will be used to match a property. The comparison used to match property names while merging. Specifies the settings used when selecting JSON. Gets or sets a flag that indicates whether an error should be thrown if no tokens are found when evaluating part of the expression. A flag that indicates whether an error should be thrown if no tokens are found when evaluating part of the expression. Represents an abstract JSON token. Writes this token to a asynchronously. A into which this method will write. The token to monitor for cancellation requests. A collection of which will be used when writing the token. A that represents the asynchronous write operation. Writes this token to a asynchronously. A into which this method will write. A collection of which will be used when writing the token. A that represents the asynchronous write operation. Asynchronously creates a from a . An positioned at the token to read into this . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous creation. The property returns a that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader. Asynchronously creates a from a . An positioned at the token to read into this . The used to load the JSON. If this is null, default load settings will be used. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous creation. The property returns a that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader. Asynchronously creates a from a . A positioned at the token to read into this . The token to monitor for cancellation requests. The default value is . A that represents the asynchronous creation. The property returns a that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader. Asynchronously creates a from a . A positioned at the token to read into this . The used to load the JSON. If this is null, default load settings will be used. The token to monitor for cancellation requests. The default value is . A that represents the asynchronous creation. The property returns a that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader. Gets a comparer that can compare two tokens for value equality. A that can compare two nodes for value equality. Gets or sets the parent. The parent. Gets the root of this . The root of this . Gets the node type for this . The type. Gets a value indicating whether this token has child tokens. true if this token has child values; otherwise, false. Compares the values of two tokens, including the values of all descendant tokens. The first to compare. The second to compare. true if the tokens are equal; otherwise false. Gets the next sibling token of this node. The that contains the next sibling token. Gets the previous sibling token of this node. The that contains the previous sibling token. Gets the path of the JSON token. Adds the specified content immediately after this token. A content object that contains simple content or a collection of content objects to be added after this token. Adds the specified content immediately before this token. A content object that contains simple content or a collection of content objects to be added before this token. Returns a collection of the ancestor tokens of this token. A collection of the ancestor tokens of this token. Returns a collection of tokens that contain this token, and the ancestors of this token. A collection of tokens that contain this token, and the ancestors of this token. Returns a collection of the sibling tokens after this token, in document order. A collection of the sibling tokens after this tokens, in document order. Returns a collection of the sibling tokens before this token, in document order. A collection of the sibling tokens before this token, in document order. Gets the with the specified key. The with the specified key. Gets the with the specified key converted to the specified type. The type to convert the token to. The token key. The converted token value. Get the first child token of this token. A containing the first child token of the . Get the last child token of this token. A containing the last child token of the . Returns a collection of the child tokens of this token, in document order. An of containing the child tokens of this , in document order. Returns a collection of the child tokens of this token, in document order, filtered by the specified type. The type to filter the child tokens on. A containing the child tokens of this , in document order. Returns a collection of the child values of this token, in document order. The type to convert the values to. A containing the child values of this , in document order. Removes this token from its parent. Replaces this token with the specified token. The value. Writes this token to a . A into which this method will write. A collection of which will be used when writing the token. Returns the indented JSON for this token. ToString() returns a non-JSON string value for tokens with a type of . If you want the JSON for all token types then you should use . The indented JSON for this token. Returns the JSON for this token using the given formatting and converters. Indicates how the output should be formatted. A collection of s which will be used when writing the token. The JSON for this token using the given formatting and converters. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to []. The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an explicit conversion from to of . The value. The result of the conversion. Performs an explicit conversion from to . The value. The result of the conversion. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from [] to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from to . The value to create a from. The initialized with the specified value. Performs an implicit conversion from of to . The value to create a from. The initialized with the specified value. Creates a for this token. A that can be used to read this token and its descendants. Creates a from an object. The object that will be used to create . A with the value of the specified object. Creates a from an object using the specified . The object that will be used to create . The that will be used when reading the object. A with the value of the specified object. Creates an instance of the specified .NET type from the . The object type that the token will be deserialized to. The new object created from the JSON value. Creates an instance of the specified .NET type from the . The object type that the token will be deserialized to. The new object created from the JSON value. Creates an instance of the specified .NET type from the using the specified . The object type that the token will be deserialized to. The that will be used when creating the object. The new object created from the JSON value. Creates an instance of the specified .NET type from the using the specified . The object type that the token will be deserialized to. The that will be used when creating the object. The new object created from the JSON value. Creates a from a . A positioned at the token to read into this . A that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader. Creates a from a . An positioned at the token to read into this . The used to load the JSON. If this is null, default load settings will be used. A that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader. Load a from a string that contains JSON. A that contains JSON. A populated from the string that contains JSON. Load a from a string that contains JSON. A that contains JSON. The used to load the JSON. If this is null, default load settings will be used. A populated from the string that contains JSON. Creates a from a . A positioned at the token to read into this . The used to load the JSON. If this is null, default load settings will be used. A that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader. Creates a from a . A positioned at the token to read into this . A that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader. Selects a using a JSONPath expression. Selects the token that matches the object path. A that contains a JSONPath expression. A , or null. Selects a using a JSONPath expression. Selects the token that matches the object path. A that contains a JSONPath expression. A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. A . Selects a using a JSONPath expression. Selects the token that matches the object path. A that contains a JSONPath expression. The used to select tokens. A . Selects a collection of elements using a JSONPath expression. A that contains a JSONPath expression. An of that contains the selected elements. Selects a collection of elements using a JSONPath expression. A that contains a JSONPath expression. A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. An of that contains the selected elements. Selects a collection of elements using a JSONPath expression. A that contains a JSONPath expression. The used to select tokens. An of that contains the selected elements. Returns the responsible for binding operations performed on this object. The expression tree representation of the runtime value. The to bind this object. Returns the responsible for binding operations performed on this object. The expression tree representation of the runtime value. The to bind this object. Creates a new instance of the . All child tokens are recursively cloned. A new instance of the . Adds an object to the annotation list of this . The annotation to add. Get the first annotation object of the specified type from this . The type of the annotation to retrieve. The first annotation object that matches the specified type, or null if no annotation is of the specified type. Gets the first annotation object of the specified type from this . The of the annotation to retrieve. The first annotation object that matches the specified type, or null if no annotation is of the specified type. Gets a collection of annotations of the specified type for this . The type of the annotations to retrieve. An that contains the annotations for this . Gets a collection of annotations of the specified type for this . The of the annotations to retrieve. An of that contains the annotations that match the specified type for this . Removes the annotations of the specified type from this . The type of annotations to remove. Removes the annotations of the specified type from this . The of annotations to remove. Compares tokens to determine whether they are equal. Determines whether the specified objects are equal. The first object of type to compare. The second object of type to compare. true if the specified objects are equal; otherwise, false. Returns a hash code for the specified object. The for which a hash code is to be returned. A hash code for the specified object. The type of is a reference type and is null. Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. Gets the at the reader's current position. Initializes a new instance of the class. The token to read from. Initializes a new instance of the class. The token to read from. The initial path of the token. It is prepended to the returned . Reads the next JSON token from the underlying . true if the next token was read successfully; false if there are no more tokens to read. Gets the path of the current JSON token. Specifies the type of token. No token type has been set. A JSON object. A JSON array. A JSON constructor. A JSON object property. A comment. An integer value. A float value. A string value. A boolean value. A null value. An undefined value. A date value. A raw JSON value. A collection of bytes value. A Guid value. A Uri value. A TimeSpan value. Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. Gets the at the writer's current position. Gets the token being written. The token being written. Initializes a new instance of the class writing to the given . The container being written to. Initializes a new instance of the class. Flushes whatever is in the buffer to the underlying . Closes this writer. If is set to true, the JSON is auto-completed. Setting to true has no additional effect, since the underlying is a type that cannot be closed. Writes the beginning of a JSON object. Writes the beginning of a JSON array. Writes the start of a constructor with the given name. The name of the constructor. Writes the end. The token. Writes the property name of a name/value pair on a JSON object. The name of the property. Writes a value. An error will be raised if the value cannot be written as a single JSON token. The value to write. Writes a null value. Writes an undefined value. Writes raw JSON. The raw JSON to write. Writes a comment /*...*/ containing the specified text. Text to place inside the comment. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a [] value. The [] value to write. Writes a value. The value to write. Writes a value. The value to write. Writes a value. The value to write. Represents a value in JSON (string, integer, date, etc). Writes this token to a asynchronously. A into which this method will write. The token to monitor for cancellation requests. A collection of which will be used when writing the token. A that represents the asynchronous write operation. Initializes a new instance of the class from another object. A object to copy from. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Initializes a new instance of the class with the given value. The value. Gets a value indicating whether this token has child tokens. true if this token has child values; otherwise, false. Creates a comment with the given value. The value. A comment with the given value. Creates a string with the given value. The value. A string with the given value. Creates a null value. A null value. Creates a undefined value. A undefined value. Gets the node type for this . The type. Gets or sets the underlying token value. The underlying token value. Writes this token to a . A into which this method will write. A collection of s which will be used when writing the token. Indicates whether the current object is equal to another object of the same type. true if the current object is equal to the parameter; otherwise, false. An object to compare with this object. Determines whether the specified is equal to the current . The to compare with the current . true if the specified is equal to the current ; otherwise, false. Serves as a hash function for a particular type. A hash code for the current . Returns a that represents this instance. ToString() returns a non-JSON string value for tokens with a type of . If you want the JSON for all token types then you should use . A that represents this instance. Returns a that represents this instance. The format. A that represents this instance. Returns a that represents this instance. The format provider. A that represents this instance. Returns a that represents this instance. The format. The format provider. A that represents this instance. Returns the responsible for binding operations performed on this object. The expression tree representation of the runtime value. The to bind this object. Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. An object to compare with this instance. A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than . Zero This instance is equal to . Greater than zero This instance is greater than . is not of the same type as this instance. Specifies how line information is handled when loading JSON. Ignore line information. Load line information. Specifies how JSON arrays are merged together. Concatenate arrays. Union arrays, skipping items that already exist. Replace all array items. Merge array items together, matched by index. Specifies how null value properties are merged. The content's null value properties will be ignored during merging. The content's null value properties will be merged. Specifies the member serialization options for the . All public members are serialized by default. Members can be excluded using or . This is the default member serialization mode. Only members marked with or are serialized. This member serialization mode can also be set by marking the class with . All public and private fields are serialized. Members can be excluded using or . This member serialization mode can also be set by marking the class with and setting IgnoreSerializableAttribute on to false. Specifies metadata property handling options for the . Read metadata properties located at the start of a JSON object. Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance. Do not try to read metadata properties. Specifies missing member handling options for the . Ignore a missing member and do not attempt to deserialize it. Throw a when a missing member is encountered during deserialization. Specifies null value handling options for the . Include null values when serializing and deserializing objects. Ignore null values when serializing and deserializing objects. Specifies how object creation is handled by the . Reuse existing objects, create new objects when needed. Only reuse existing objects. Always create new objects. Specifies reference handling options for the . Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement . Do not preserve references when serializing types. Preserve references when serializing into a JSON object structure. Preserve references when serializing into a JSON array structure. Preserve references when serializing. Specifies reference loop handling options for the . Throw a when a loop is encountered. Ignore loop references and do not serialize. Serialize loop references. Indicating whether a property is required. The property is not required. The default state. The property must be defined in JSON but can be a null value. The property must be defined in JSON and cannot be a null value. The property is not required but it cannot be a null value. Contains the JSON schema extension methods. JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. Determines whether the is valid. JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. The source to test. The schema to test with. true if the specified is valid; otherwise, false. Determines whether the is valid. JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. The source to test. The schema to test with. When this method returns, contains any error messages generated while validating. true if the specified is valid; otherwise, false. Validates the specified . JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. The source to test. The schema to test with. Validates the specified . JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. The source to test. The schema to test with. The validation event handler. An in-memory representation of a JSON Schema. JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. Gets or sets the id. Gets or sets the title. Gets or sets whether the object is required. Gets or sets whether the object is read-only. Gets or sets whether the object is visible to users. Gets or sets whether the object is transient. Gets or sets the description of the object. Gets or sets the types of values allowed by the object. The type. Gets or sets the pattern. The pattern. Gets or sets the minimum length. The minimum length. Gets or sets the maximum length. The maximum length. Gets or sets a number that the value should be divisible by. A number that the value should be divisible by. Gets or sets the minimum. The minimum. Gets or sets the maximum. The maximum. Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute (). A flag indicating whether the value can not equal the number defined by the minimum attribute (). Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute (). A flag indicating whether the value can not equal the number defined by the maximum attribute (). Gets or sets the minimum number of items. The minimum number of items. Gets or sets the maximum number of items. The maximum number of items. Gets or sets the of items. The of items. Gets or sets a value indicating whether items in an array are validated using the instance at their array position from . true if items are validated using their array position; otherwise, false. Gets or sets the of additional items. The of additional items. Gets or sets a value indicating whether additional items are allowed. true if additional items are allowed; otherwise, false. Gets or sets whether the array items must be unique. Gets or sets the of properties. The of properties. Gets or sets the of additional properties. The of additional properties. Gets or sets the pattern properties. The pattern properties. Gets or sets a value indicating whether additional properties are allowed. true if additional properties are allowed; otherwise, false. Gets or sets the required property if this property is present. The required property if this property is present. Gets or sets the a collection of valid enum values allowed. A collection of valid enum values allowed. Gets or sets disallowed types. The disallowed types. Gets or sets the default value. The default value. Gets or sets the collection of that this schema extends. The collection of that this schema extends. Gets or sets the format. The format. Initializes a new instance of the class. Reads a from the specified . The containing the JSON Schema to read. The object representing the JSON Schema. Reads a from the specified . The containing the JSON Schema to read. The to use when resolving schema references. The object representing the JSON Schema. Load a from a string that contains JSON Schema. A that contains JSON Schema. A populated from the string that contains JSON Schema. Load a from a string that contains JSON Schema using the specified . A that contains JSON Schema. The resolver. A populated from the string that contains JSON Schema. Writes this schema to a . A into which this method will write. Writes this schema to a using the specified . A into which this method will write. The resolver used. Returns a that represents the current . A that represents the current . Returns detailed information about the schema exception. JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. Gets the line number indicating where the error occurred. The line number indicating where the error occurred. Gets the line position indicating where the error occurred. The line position indicating where the error occurred. Gets the path to the JSON where the error occurred. The path to the JSON where the error occurred. Initializes a new instance of the class. Initializes a new instance of the class with a specified error message. The error message that explains the reason for the exception. Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or null if no inner exception is specified. Generates a from a specified . JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. Gets or sets how undefined schemas are handled by the serializer. Gets or sets the contract resolver. The contract resolver. Generate a from the specified type. The type to generate a from. A generated from the specified type. Generate a from the specified type. The type to generate a from. The used to resolve schema references. A generated from the specified type. Generate a from the specified type. The type to generate a from. Specify whether the generated root will be nullable. A generated from the specified type. Generate a from the specified type. The type to generate a from. The used to resolve schema references. Specify whether the generated root will be nullable. A generated from the specified type. Resolves from an id. JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. Gets or sets the loaded schemas. The loaded schemas. Initializes a new instance of the class. Gets a for the specified reference. The id. A for the specified reference. The value types allowed by the . JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. No type specified. String type. Float type. Integer type. Boolean type. Object type. Array type. Null type. Any type. Specifies undefined schema Id handling options for the . JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. Do not infer a schema Id. Use the .NET type name as the schema Id. Use the assembly qualified .NET type name as the schema Id. Returns detailed information related to the . JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. Gets the associated with the validation error. The JsonSchemaException associated with the validation error. Gets the path of the JSON location where the validation error occurred. The path of the JSON location where the validation error occurred. Gets the text description corresponding to the validation error. The text description. Represents the callback method that will handle JSON schema validation events and the . JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. A camel case naming strategy. Initializes a new instance of the class. A flag indicating whether dictionary keys should be processed. A flag indicating whether explicitly specified property names should be processed, e.g. a property name customized with a . Initializes a new instance of the class. A flag indicating whether dictionary keys should be processed. A flag indicating whether explicitly specified property names should be processed, e.g. a property name customized with a . A flag indicating whether extension data names should be processed. Initializes a new instance of the class. Resolves the specified property name. The property name to resolve. The resolved property name. Resolves member mappings for a type, camel casing property names. Initializes a new instance of the class. Resolves the contract for a given type. The type to resolve a contract for. The contract for a given type. Used by to resolve a for a given . Gets a value indicating whether members are being get and set using dynamic code generation. This value is determined by the runtime permissions available. true if using dynamic code generation; otherwise, false. Gets or sets the default members search flags. The default members search flags. Gets or sets a value indicating whether compiler generated members should be serialized. true if serialized compiler generated members; otherwise, false. Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. true if the interface will be ignored when serializing and deserializing types; otherwise, false. Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types. true if the attribute will be ignored when serializing and deserializing types; otherwise, false. Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types. true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false. Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types. true if the ShouldSerialize members will be ignored when serializing and deserializing types; otherwise, false. Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized. The naming strategy used to resolve how property names and dictionary keys are serialized. Initializes a new instance of the class. Resolves the contract for a given type. The type to resolve a contract for. The contract for a given type. Gets the serializable members for the type. The type to get serializable members for. The serializable members for the type. Creates a for the given type. Type of the object. A for the given type. Creates the constructor parameters. The constructor to create properties for. The type's member properties. Properties for the given . Creates a for the given . The matching member property. The constructor parameter. A created for the given . Resolves the default for the contract. Type of the object. The contract's default . Creates a for the given type. Type of the object. A for the given type. Creates a for the given type. Type of the object. A for the given type. Creates a for the given type. Type of the object. A for the given type. Creates a for the given type. Type of the object. A for the given type. Creates a for the given type. Type of the object. A for the given type. Creates a for the given type. Type of the object. A for the given type. Creates a for the given type. Type of the object. A for the given type. Determines which contract type is created for the given type. Type of the object. A for the given type. Creates properties for the given . The type to create properties for. /// The member serialization mode for the type. Properties for the given . Creates the used by the serializer to get and set values from a member. The member. The used by the serializer to get and set values from a member. Creates a for the given . The member's parent . The member to create a for. A created for the given . Resolves the name of the property. Name of the property. Resolved name of the property. Resolves the name of the extension data. By default no changes are made to extension data names. Name of the extension data. Resolved name of the extension data. Resolves the key of the dictionary. By default is used to resolve dictionary keys. Key of the dictionary. Resolved key of the dictionary. Gets the resolved name of the property. Name of the property. Name of the property. The default naming strategy. Property names and dictionary keys are unchanged. Resolves the specified property name. The property name to resolve. The resolved property name. The default serialization binder used when resolving and loading classes from type names. Initializes a new instance of the class. When overridden in a derived class, controls the binding of a serialized object to a type. Specifies the name of the serialized object. Specifies the name of the serialized object. The type of the object the formatter creates a new instance of. When overridden in a derived class, controls the binding of a serialized object to a type. The type of the object the formatter creates a new instance of. Specifies the name of the serialized object. Specifies the name of the serialized object. Provides information surrounding an error. Gets the error. The error. Gets the original object that caused the error. The original object that caused the error. Gets the member that caused the error. The member that caused the error. Gets the path of the JSON location where the error occurred. The path of the JSON location where the error occurred. Gets or sets a value indicating whether this is handled. true if handled; otherwise, false. Provides data for the Error event. Gets the current object the error event is being raised against. The current object the error event is being raised against. Gets the error context. The error context. Initializes a new instance of the class. The current object. The error context. Get and set values for a using dynamic methods. Initializes a new instance of the class. The member info. Sets the value. The target to set the value on. The value to set on the target. Gets the value. The target to get the value from. The value. Provides methods to get attributes. Returns a collection of all of the attributes, or an empty collection if there are no attributes. When true, look up the hierarchy chain for the inherited custom attribute. A collection of s, or an empty collection. Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. The type of the attributes. When true, look up the hierarchy chain for the inherited custom attribute. A collection of s, or an empty collection. Used by to resolve a for a given . Resolves the contract for a given type. The type to resolve a contract for. The contract for a given type. Used to resolve references when serializing and deserializing JSON by the . Resolves a reference to its object. The serialization context. The reference to resolve. The object that was resolved from the reference. Gets the reference for the specified object. The serialization context. The object to get a reference for. The reference to the object. Determines whether the specified object is referenced. The serialization context. The object to test for a reference. true if the specified object is referenced; otherwise, false. Adds a reference to the specified object. The serialization context. The reference. The object to reference. Allows users to control class loading and mandate what class to load. When implemented, controls the binding of a serialized object to a type. Specifies the name of the serialized object. Specifies the name of the serialized object The type of the object the formatter creates a new instance of. When implemented, controls the binding of a serialized object to a type. The type of the object the formatter creates a new instance of. Specifies the name of the serialized object. Specifies the name of the serialized object. Represents a trace writer. Gets the that will be used to filter the trace messages passed to the writer. For example a filter level of will exclude messages and include , and messages. The that will be used to filter the trace messages passed to the writer. Writes the specified trace level, message and optional exception. The at which to write this trace. The trace message. The trace exception. This parameter is optional. Provides methods to get and set values. Sets the value. The target to set the value on. The value to set on the target. Gets the value. The target to get the value from. The value. Contract details for a used by the . Gets the of the collection items. The of the collection items. Gets a value indicating whether the collection type is a multidimensional array. true if the collection type is a multidimensional array; otherwise, false. Gets or sets the function used to create the object. When set this function will override . The function used to create the object. Gets a value indicating whether the creator has a parameter with the collection values. true if the creator has a parameter with the collection values; otherwise, false. Initializes a new instance of the class. The underlying type for the contract. Contract details for a used by the . Gets or sets the default collection items . The converter. Gets or sets a value indicating whether the collection items preserve object references. true if collection items preserve object references; otherwise, false. Gets or sets the collection item reference loop handling. The reference loop handling. Gets or sets the collection item type name handling. The type name handling. Initializes a new instance of the class. The underlying type for the contract. Handles serialization callback events. The object that raised the callback event. The streaming context. Handles serialization error callback events. The object that raised the callback event. The streaming context. The error context. Sets extension data for an object during deserialization. The object to set extension data on. The extension data key. The extension data value. Gets extension data for an object during serialization. The object to set extension data on. Contract details for a used by the . Gets the underlying type for the contract. The underlying type for the contract. Gets or sets the type created during deserialization. The type created during deserialization. Gets or sets whether this type contract is serialized as a reference. Whether this type contract is serialized as a reference. Gets or sets the default for this contract. The converter. Gets the internally resolved for the contract's type. This converter is used as a fallback converter when no other converter is resolved. Setting will always override this converter. Gets or sets all methods called immediately after deserialization of the object. The methods called immediately after deserialization of the object. Gets or sets all methods called during deserialization of the object. The methods called during deserialization of the object. Gets or sets all methods called after serialization of the object graph. The methods called after serialization of the object graph. Gets or sets all methods called before serialization of the object. The methods called before serialization of the object. Gets or sets all method called when an error is thrown during the serialization of the object. The methods called when an error is thrown during the serialization of the object. Gets or sets the default creator method used to create the object. The default creator method used to create the object. Gets or sets a value indicating whether the default creator is non-public. true if the default object creator is non-public; otherwise, false. Contract details for a used by the . Gets or sets the dictionary key resolver. The dictionary key resolver. Gets the of the dictionary keys. The of the dictionary keys. Gets the of the dictionary values. The of the dictionary values. Gets or sets the function used to create the object. When set this function will override . The function used to create the object. Gets a value indicating whether the creator has a parameter with the dictionary values. true if the creator has a parameter with the dictionary values; otherwise, false. Initializes a new instance of the class. The underlying type for the contract. Contract details for a used by the . Gets the object's properties. The object's properties. Gets or sets the property name resolver. The property name resolver. Initializes a new instance of the class. The underlying type for the contract. Contract details for a used by the . Gets or sets the object constructor. The object constructor. Initializes a new instance of the class. The underlying type for the contract. Contract details for a used by the . Initializes a new instance of the class. The underlying type for the contract. Contract details for a used by the . Gets or sets the object member serialization. The member object serialization. Gets or sets the missing member handling used when deserializing this object. The missing member handling. Gets or sets a value that indicates whether the object's properties are required. A value indicating whether the object's properties are required. Gets or sets how the object's properties with null values are handled during serialization and deserialization. How the object's properties with null values are handled during serialization and deserialization. Gets the object's properties. The object's properties. Gets a collection of instances that define the parameters used with . Gets or sets the function used to create the object. When set this function will override . This function is called with a collection of arguments which are defined by the collection. The function used to create the object. Gets or sets the extension data setter. Gets or sets the extension data getter. Gets or sets the extension data value type. Gets or sets the extension data name resolver. The extension data name resolver. Initializes a new instance of the class. The underlying type for the contract. Contract details for a used by the . Initializes a new instance of the class. The underlying type for the contract. Maps a JSON property to a .NET member or constructor parameter. Gets or sets the name of the property. The name of the property. Gets or sets the type that declared this property. The type that declared this property. Gets or sets the order of serialization of a member. The numeric order of serialization. Gets or sets the name of the underlying member or parameter. The name of the underlying member or parameter. Gets the that will get and set the during serialization. The that will get and set the during serialization. Gets or sets the for this property. The for this property. Gets or sets the type of the property. The type of the property. Gets or sets the for the property. If set this converter takes precedence over the contract converter for the property type. The converter. Gets or sets the member converter. The member converter. Gets or sets a value indicating whether this is ignored. true if ignored; otherwise, false. Gets or sets a value indicating whether this is readable. true if readable; otherwise, false. Gets or sets a value indicating whether this is writable. true if writable; otherwise, false. Gets or sets a value indicating whether this has a member attribute. true if has a member attribute; otherwise, false. Gets the default value. The default value. Gets or sets a value indicating whether this is required. A value indicating whether this is required. Gets a value indicating whether has a value specified. Gets or sets a value indicating whether this property preserves object references. true if this instance is reference; otherwise, false. Gets or sets the property null value handling. The null value handling. Gets or sets the property default value handling. The default value handling. Gets or sets the property reference loop handling. The reference loop handling. Gets or sets the property object creation handling. The object creation handling. Gets or sets or sets the type name handling. The type name handling. Gets or sets a predicate used to determine whether the property should be serialized. A predicate used to determine whether the property should be serialized. Gets or sets a predicate used to determine whether the property should be deserialized. A predicate used to determine whether the property should be deserialized. Gets or sets a predicate used to determine whether the property should be serialized. A predicate used to determine whether the property should be serialized. Gets or sets an action used to set whether the property has been deserialized. An action used to set whether the property has been deserialized. Returns a that represents this instance. A that represents this instance. Gets or sets the converter used when serializing the property's collection items. The collection's items converter. Gets or sets whether this property's collection items are serialized as a reference. Whether this property's collection items are serialized as a reference. Gets or sets the type name handling used when serializing the property's collection items. The collection's items type name handling. Gets or sets the reference loop handling used when serializing the property's collection items. The collection's items reference loop handling. A collection of objects. Initializes a new instance of the class. The type. When implemented in a derived class, extracts the key from the specified element. The element from which to extract the key. The key for the specified element. Adds a object. The property to add to the collection. Gets the closest matching object. First attempts to get an exact case match of and then a case insensitive match. Name of the property. A matching property if found. Gets a property by property name. The name of the property to get. Type property name string comparison. A matching property if found. Contract details for a used by the . Initializes a new instance of the class. The underlying type for the contract. Lookup and create an instance of the type described by the argument. The type to create. Optional arguments to pass to an initializing constructor of the JsonConverter. If null, the default constructor is used. A kebab case naming strategy. Initializes a new instance of the class. A flag indicating whether dictionary keys should be processed. A flag indicating whether explicitly specified property names should be processed, e.g. a property name customized with a . Initializes a new instance of the class. A flag indicating whether dictionary keys should be processed. A flag indicating whether explicitly specified property names should be processed, e.g. a property name customized with a . A flag indicating whether extension data names should be processed. Initializes a new instance of the class. Resolves the specified property name. The property name to resolve. The resolved property name. Represents a trace writer that writes to memory. When the trace message limit is reached then old trace messages will be removed as new messages are added. Gets the that will be used to filter the trace messages passed to the writer. For example a filter level of will exclude messages and include , and messages. The that will be used to filter the trace messages passed to the writer. Initializes a new instance of the class. Writes the specified trace level, message and optional exception. The at which to write this trace. The trace message. The trace exception. This parameter is optional. Returns an enumeration of the most recent trace messages. An enumeration of the most recent trace messages. Returns a of the most recent trace messages. A of the most recent trace messages. A base class for resolving how property names and dictionary keys are serialized. A flag indicating whether dictionary keys should be processed. Defaults to false. A flag indicating whether extension data names should be processed. Defaults to false. A flag indicating whether explicitly specified property names, e.g. a property name customized with a , should be processed. Defaults to false. Gets the serialized name for a given property name. The initial property name. A flag indicating whether the property has had a name explicitly specified. The serialized property name. Gets the serialized name for a given extension data name. The initial extension data name. The serialized extension data name. Gets the serialized key for a given dictionary key. The initial dictionary key. The serialized dictionary key. Resolves the specified property name. The property name to resolve. The resolved property name. Hash code calculation Object equality implementation Compare to another NamingStrategy Represents a method that constructs an object. The object type to create. When applied to a method, specifies that the method is called when an error occurs serializing an object. Provides methods to get attributes from a , , or . Initializes a new instance of the class. The instance to get attributes for. This parameter should be a , , or . Returns a collection of all of the attributes, or an empty collection if there are no attributes. When true, look up the hierarchy chain for the inherited custom attribute. A collection of s, or an empty collection. Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. The type of the attributes. When true, look up the hierarchy chain for the inherited custom attribute. A collection of s, or an empty collection. Get and set values for a using reflection. Initializes a new instance of the class. The member info. Sets the value. The target to set the value on. The value to set on the target. Gets the value. The target to get the value from. The value. A snake case naming strategy. Initializes a new instance of the class. A flag indicating whether dictionary keys should be processed. A flag indicating whether explicitly specified property names should be processed, e.g. a property name customized with a . Initializes a new instance of the class. A flag indicating whether dictionary keys should be processed. A flag indicating whether explicitly specified property names should be processed, e.g. a property name customized with a . A flag indicating whether extension data names should be processed. Initializes a new instance of the class. Resolves the specified property name. The property name to resolve. The resolved property name. Specifies how strings are escaped when writing JSON text. Only control characters (e.g. newline) are escaped. All non-ASCII and control characters (e.g. newline) are escaped. HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. Specifies what messages to output for the class. Output no tracing and debugging messages. Output error-handling messages. Output warnings and error-handling messages. Output informational messages, warnings, and error-handling messages. Output all debugging and tracing messages. Indicates the method that will be used during deserialization for locating and loading assemblies. In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly. In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly. Specifies type name handling options for the . should be used with caution when your application deserializes JSON from an external source. Incoming types should be validated with a custom when deserializing with a value other than . Do not include the .NET type name when serializing types. Include the .NET type name when serializing into a JSON object structure. Include the .NET type name when serializing into a JSON array structure. Always include the .NET type name when serializing. Include the .NET type name when the type of the object being serialized is not the same as its declared type. Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON you must specify a root type object with or . Determines whether the collection is null or empty. The collection. true if the collection is null or empty; otherwise, false. Adds the elements of the specified collection to the specified generic . The list to add to. The collection of elements to add. Converts the value to the specified type. If the value is unable to be converted, the value is checked whether it assignable to the specified type. The value to convert. The culture to use when converting. The type to convert or cast the value to. The converted type. If conversion was unsuccessful, the initial value is returned if assignable to the target type. Helper method for generating a MetaObject which calls a specific method on Dynamic that returns a result Helper method for generating a MetaObject which calls a specific method on Dynamic, but uses one of the arguments for the result. Helper method for generating a MetaObject which calls a specific method on Dynamic, but uses one of the arguments for the result. Returns a Restrictions object which includes our current restrictions merged with a restriction limiting our type Helper class for serializing immutable collections. Note that this is used by all builds, even those that don't support immutable collections, in case the DLL is GACed https://github.com/JamesNK/Newtonsoft.Json/issues/652 Gets the type of the typed collection's items. The type. The type of the typed collection's items. Gets the member's underlying type. The member. The underlying type of the member. Determines whether the property is an indexed property. The property. true if the property is an indexed property; otherwise, false. Gets the member's value on the object. The member. The target object. The member's value on the object. Sets the member's value on the target object. The member. The target. The value. Determines whether the specified MemberInfo can be read. The MemberInfo to determine whether can be read. /// if set to true then allow the member to be gotten non-publicly. true if the specified MemberInfo can be read; otherwise, false. Determines whether the specified MemberInfo can be set. The MemberInfo to determine whether can be set. if set to true then allow the member to be set non-publicly. if set to true then allow the member to be set if read-only. true if the specified MemberInfo can be set; otherwise, false. Builds a string. Unlike this class lets you reuse its internal buffer. Determines whether the string is all white space. Empty string will return false. The string to test whether it is all white space. true if the string is all white space; otherwise, false. Specifies the state of the . An exception has been thrown, which has left the in an invalid state. You may call the method to put the in the Closed state. Any other method calls result in an being thrown. The method has been called. An object is being written. An array is being written. A constructor is being written. A property is being written. A write method has not been called. Specifies that an output will not be null even if the corresponding type allows it. Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. Initializes the attribute with the specified return value condition. The return value condition. If the method returns this value, the associated parameter will not be null. Gets the return value condition. Specifies that an output may be null even if the corresponding type disallows it. Specifies that null is allowed as an input even if the corresponding type disallows it. Specifies that the method will not return if the associated Boolean parameter is passed the specified value. Initializes a new instance of the class. The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to the associated parameter matches this value. Gets the condition parameter value.