---
title: "GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents"
method: GET
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents"
tags: ["SyncAgents"]
---

# GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents

`GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents`

Lists sync agents in a server.

## Path parameters

- `resourceGroupName` string, required
- `serverName` string, required
- `subscriptionId` string, required

## Query parameters

- `api-version` string, required

## Response `200`

Successfully retrieved the list of sync agents.

- SyncAgentListResult — A list of sync agents.
  - `value` SyncAgent[] — Array of results. — unresolved $ref
  - `nextLink` string — Link to retrieve next page of results.

## Other responses

- `default` — *** Error Responses: *** * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty. * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty. * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty. * 400 InvalidDatabaseResourceId - Invalid database resource identifier. * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url. * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier. * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url. * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url. * 400 InvalidSyncAgent - Sync agent is invalid. * 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member. * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid. * 404 SubscriptionDoesNotHaveServer - The requested server was not found * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

---

[API](https://skmtc.dev/azure/apis/sqlmanagementclient-d597e2ee.md) · [All operations](https://skmtc.dev/azure/apis/sqlmanagementclient-d597e2ee/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/sqlmanagementclient-d597e2ee/revisions/198231d0f91f/schema)
