IServiceConfiguration<TService>.Authenticate 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
Authenticate(SecurityToken) |
Authenticates against the trusted Microsoft Dynamics 365 Secure Token Service using a security token. |
Authenticate(ClientCredentials) |
Authenticates against the trusted Microsoft Dynamics 365 Secure Token Service using client credentials. |
Authenticate(ClientCredentials, SecurityTokenResponse) |
Authenticates against Microsoft account using client credentials and a security token response. |
Authenticate(SecurityToken)
Authenticates against the trusted Microsoft Dynamics 365 Secure Token Service using a security token.
public:
Microsoft::Xrm::Sdk::Client::SecurityTokenResponse ^ Authenticate(System::IdentityModel::Tokens::SecurityToken ^ securityToken);
public Microsoft.Xrm.Sdk.Client.SecurityTokenResponse Authenticate (System.IdentityModel.Tokens.SecurityToken securityToken);
abstract member Authenticate : System.IdentityModel.Tokens.SecurityToken -> Microsoft.Xrm.Sdk.Client.SecurityTokenResponse
Public Function Authenticate (securityToken As SecurityToken) As SecurityTokenResponse
Parameters
- securityToken
- SecurityToken
A security token retrieved from an identity provider other than the trusted Microsoft Dynamics 365 Secure Token Service (when in federation mode).
Returns
The security token response.
Applies to
Authenticate(ClientCredentials)
Authenticates against the trusted Microsoft Dynamics 365 Secure Token Service using client credentials.
public:
Microsoft::Xrm::Sdk::Client::SecurityTokenResponse ^ Authenticate(System::ServiceModel::Description::ClientCredentials ^ clientCredentials);
public Microsoft.Xrm.Sdk.Client.SecurityTokenResponse Authenticate (System.ServiceModel.Description.ClientCredentials clientCredentials);
abstract member Authenticate : System.ServiceModel.Description.ClientCredentials -> Microsoft.Xrm.Sdk.Client.SecurityTokenResponse
Public Function Authenticate (clientCredentials As ClientCredentials) As SecurityTokenResponse
Parameters
- clientCredentials
- ClientCredentials
Specifies a client credential instance containing either Windows credentials or UserName credentials.
Returns
The security token response.
Remarks
Returns null
when the service is in Active Directory mode. A non-null value is returned when in federated mode.
Applies to
Authenticate(ClientCredentials, SecurityTokenResponse)
Authenticates against Microsoft account using client credentials and a security token response.
public:
Microsoft::Xrm::Sdk::Client::SecurityTokenResponse ^ Authenticate(System::ServiceModel::Description::ClientCredentials ^ clientCredentials, Microsoft::Xrm::Sdk::Client::SecurityTokenResponse ^ deviceSecurityToken);
public Microsoft.Xrm.Sdk.Client.SecurityTokenResponse Authenticate (System.ServiceModel.Description.ClientCredentials clientCredentials, Microsoft.Xrm.Sdk.Client.SecurityTokenResponse deviceSecurityToken);
abstract member Authenticate : System.ServiceModel.Description.ClientCredentials * Microsoft.Xrm.Sdk.Client.SecurityTokenResponse -> Microsoft.Xrm.Sdk.Client.SecurityTokenResponse
Public Function Authenticate (clientCredentials As ClientCredentials, deviceSecurityToken As SecurityTokenResponse) As SecurityTokenResponse
Parameters
- clientCredentials
- ClientCredentials
Specifies a client credential instance containing UserName credentials where the UserName and Password properties are set.
- deviceSecurityToken
- SecurityTokenResponse
A security token response received from authenticating the user's device with Microsoft account.
Returns
The security token response.