| title | synchronizationJob: validateCredentials |
|---|---|
| description | Validate that the credentials are valid in the tenant. |
| ms.localizationpriority | medium |
| doc_type | apiPageType |
| author | ArvindHarinder1 |
| ms.subservice | entra-applications |
| ms.date | 08/13/2024 |
Namespace: microsoft.graph
Validate that the credentials are valid in the tenant.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
[!INCLUDE rbac-synchronization-apis]
POST /servicePrincipals/{id}/synchronization/jobs/{id}/validateCredentials
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
In the request body, provide a JSON object with the following parameters.
| Parameter | Type | Description |
|---|---|---|
| useSavedCredentials | Boolean | When true, the credentials parameter will be ignored and the previously saved credentials (if any) will be validated instead. |
| credentials | synchronizationSecretKeyStringValuePair collection | Credentials to validate. Ignored when the useSavedCredentials parameter is true. |
If validation is successful, this method returns a 204, No Content response code. It doesn't return anything in the response body.
The following example shows a request.
POST https://graph.microsoft.com/v1.0/servicePrincipals/{id}/synchronization/jobs/{id}/validateCredentials
Content-type: application/json
{
credentials: [
{ key: "UserName", value: "user@domain.com" },
{ key: "Password", value: "password-value" }
]
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 204 No Content