ConfidentialClientApplicationBuilder.WithClientClaims Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WithClientClaims(X509Certificate2, IDictionary<String,String>, Boolean) |
Sets the certificate associated with the application along with the specific claims to sign.
By default, this will merge the |
WithClientClaims(X509Certificate2, IDictionary<String,String>, Boolean, Boolean) |
Sets the certificate associated with the application along with the specific claims to sign.
By default, this will merge the |
WithClientClaims(X509Certificate2, IDictionary<String,String>, Boolean)
Sets the certificate associated with the application along with the specific claims to sign.
By default, this will merge the claimsToSign
with the default required set of claims needed for authentication.
If mergeWithDefaultClaims
is set to false, you will need to provide the required default claims. See https://aka.ms/msal-net-client-assertion
public Microsoft.Identity.Client.ConfidentialClientApplicationBuilder WithClientClaims (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Collections.Generic.IDictionary<string,string> claimsToSign, bool mergeWithDefaultClaims);
member this.WithClientClaims : System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Collections.Generic.IDictionary<string, string> * bool -> Microsoft.Identity.Client.ConfidentialClientApplicationBuilder
Public Function WithClientClaims (certificate As X509Certificate2, claimsToSign As IDictionary(Of String, String), mergeWithDefaultClaims As Boolean) As ConfidentialClientApplicationBuilder
Parameters
- certificate
- X509Certificate2
The X509 certificate used as credentials to prove the identity of the application to Azure AD.
- claimsToSign
- IDictionary<String,String>
The claims to be signed by the provided certificate.
- mergeWithDefaultClaims
- Boolean
Determines whether or not to merge claimsToSign
with the default claims required for authentication.
Returns
Remarks
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.
Applies to
WithClientClaims(X509Certificate2, IDictionary<String,String>, Boolean, Boolean)
Sets the certificate associated with the application along with the specific claims to sign.
By default, this will merge the claimsToSign
with the default required set of claims needed for authentication.
If mergeWithDefaultClaims
is set to false, you will need to provide the required default claims. See https://aka.ms/msal-net-client-assertion
public Microsoft.Identity.Client.ConfidentialClientApplicationBuilder WithClientClaims (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Collections.Generic.IDictionary<string,string> claimsToSign, bool mergeWithDefaultClaims = true, bool sendX5C = false);
member this.WithClientClaims : System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Collections.Generic.IDictionary<string, string> * bool * bool -> Microsoft.Identity.Client.ConfidentialClientApplicationBuilder
Public Function WithClientClaims (certificate As X509Certificate2, claimsToSign As IDictionary(Of String, String), Optional mergeWithDefaultClaims As Boolean = true, Optional sendX5C As Boolean = false) As ConfidentialClientApplicationBuilder
Parameters
- certificate
- X509Certificate2
The X509 certificate used as credentials to prove the identity of the application to Azure AD.
- claimsToSign
- IDictionary<String,String>
The claims to be signed by the provided certificate.
- mergeWithDefaultClaims
- Boolean
Determines whether or not to merge claimsToSign
with the default claims required for authentication.
- sendX5C
- Boolean
To send X5C with every request or not.
Returns
Remarks
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.