Servers - List

Gets a list of all servers in the subscription.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers?api-version=2021-11-01
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers?$expand={$expand}&api-version=2021-11-01

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

api-version
query True

string

The API version to use for the request.

$expand
query

string

The child resources to include in the response.

Responses

Name Type Description
200 OK

ServerListResult

Successfully retrieved the list of servers.

Other Status Codes

*** Error Responses: ***

  • 404 SubscriptionNotFound - The requested subscription was not found.

Examples

List servers
List servers with $expand=administrators/activedirectory

List servers

Sample Request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers?api-version=2021-11-01

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645",
      "name": "sqlcrudtest-4645",
      "type": "Microsoft.Sql/servers",
      "location": "japaneast",
      "kind": "v12.0",
      "properties": {
        "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net",
        "administratorLogin": "dummylogin",
        "version": "12.0",
        "state": "Ready",
        "workspaceFeature": "Connected",
        "publicNetworkAccess": "Enabled",
        "restrictOutboundNetworkAccess": "Enabled",
        "privateEndpointConnections": [
          {
            "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444",
            "properties": {
              "provisioningState": "Ready",
              "privateEndpoint": {
                "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
              },
              "privateLinkServiceConnectionState": {
                "status": "Approved",
                "description": "Auto-approved",
                "actionsRequired": "None"
              }
            }
          }
        ]
      }
    },
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661",
      "name": "sqlcrudtest-6661",
      "type": "Microsoft.Sql/servers",
      "location": "japaneast",
      "kind": "v12.0",
      "properties": {
        "fullyQualifiedDomainName": "sqlcrudtest-6661.database.windows.net",
        "administratorLogin": "dummylogin",
        "version": "12.0",
        "state": "Ready",
        "workspaceFeature": "Connected",
        "publicNetworkAccess": "Enabled",
        "restrictOutboundNetworkAccess": "Enabled",
        "privateEndpointConnections": [
          {
            "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444",
            "properties": {
              "provisioningState": "Ready",
              "privateEndpoint": {
                "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
              },
              "privateLinkServiceConnectionState": {
                "status": "Approved",
                "description": "Auto-approved",
                "actionsRequired": "None"
              }
            }
          }
        ]
      }
    }
  ]
}

List servers with $expand=administrators/activedirectory

Sample Request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers?api-version=2021-11-01

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645",
      "name": "sqlcrudtest-4645",
      "type": "Microsoft.Sql/servers",
      "location": "japaneast",
      "kind": "v12.0",
      "properties": {
        "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net",
        "administratorLogin": "dummylogin",
        "version": "12.0",
        "state": "Ready",
        "workspaceFeature": "Connected",
        "publicNetworkAccess": "Enabled",
        "restrictOutboundNetworkAccess": "Enabled",
        "administrators": {
          "principalType": "User",
          "login": "bob@contoso.com",
          "sid": "00000011-1111-2222-2222-123456789111",
          "tenantId": "00000011-1111-2222-2222-123456789111",
          "azureADOnlyAuthentication": true
        },
        "privateEndpointConnections": [
          {
            "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444",
            "properties": {
              "provisioningState": "Ready",
              "privateEndpoint": {
                "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
              },
              "privateLinkServiceConnectionState": {
                "status": "Approved",
                "description": "Auto-approved",
                "actionsRequired": "None"
              }
            }
          }
        ]
      }
    },
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661",
      "name": "sqlcrudtest-6661",
      "type": "Microsoft.Sql/servers",
      "location": "japaneast",
      "kind": "v12.0",
      "properties": {
        "fullyQualifiedDomainName": "sqlcrudtest-6661.database.windows.net",
        "administratorLogin": "dummylogin",
        "version": "12.0",
        "state": "Ready",
        "workspaceFeature": "Connected",
        "publicNetworkAccess": "Enabled",
        "restrictOutboundNetworkAccess": "Enabled",
        "administrators": {
          "principalType": "User",
          "login": "bob@contoso.com",
          "sid": "00000011-1111-2222-2222-123456789111",
          "tenantId": "00000011-1111-2222-2222-123456789111",
          "azureADOnlyAuthentication": true
        },
        "privateEndpointConnections": [
          {
            "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444",
            "properties": {
              "provisioningState": "Ready",
              "privateEndpoint": {
                "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
              },
              "privateLinkServiceConnectionState": {
                "status": "Approved",
                "description": "Auto-approved",
                "actionsRequired": "None"
              }
            }
          }
        ]
      }
    }
  ]
}

Definitions

Name Description
AdministratorType

Type of the sever administrator.

IdentityType

The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.

PrincipalType

Principal Type of the sever administrator.

PrivateEndpointConnectionProperties

Properties of a private endpoint connection.

PrivateEndpointProperty
PrivateEndpointProvisioningState

State of the private endpoint connection.

PrivateLinkServiceConnectionStateActionsRequire

The actions required for private link service connection.

PrivateLinkServiceConnectionStateProperty
PrivateLinkServiceConnectionStateStatus

The private link service connection status.

ResourceIdentity

Azure Active Directory identity configuration for a resource.

Server

An Azure SQL Database server.

ServerExternalAdministrator

Properties of a active directory administrator.

ServerListResult

A list of servers.

ServerNetworkAccessFlag

Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'

ServerPrivateEndpointConnection

A private endpoint connection under a server

ServerWorkspaceFeature

Whether or not existing server has a workspace created and if it allows connection from workspace

UserIdentity

Azure Active Directory identity configuration for a resource.

AdministratorType

Type of the sever administrator.

Name Type Description
ActiveDirectory

string

IdentityType

The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.

Name Type Description
None

string

SystemAssigned

string

SystemAssigned,UserAssigned

string

UserAssigned

string

PrincipalType

Principal Type of the sever administrator.

Name Type Description
Application

string

Group

string

User

string

PrivateEndpointConnectionProperties

Properties of a private endpoint connection.

Name Type Description
groupIds

string[]

Group IDs.

privateEndpoint

PrivateEndpointProperty

Private endpoint which the connection belongs to.

privateLinkServiceConnectionState

PrivateLinkServiceConnectionStateProperty

Connection state of the private endpoint connection.

provisioningState

PrivateEndpointProvisioningState

State of the private endpoint connection.

PrivateEndpointProperty

Name Type Description
id

string

Resource id of the private endpoint.

PrivateEndpointProvisioningState

State of the private endpoint connection.

Name Type Description
Approving

string

Dropping

string

Failed

string

Ready

string

Rejecting

string

PrivateLinkServiceConnectionStateActionsRequire

The actions required for private link service connection.

Name Type Description
None

string

PrivateLinkServiceConnectionStateProperty

Name Type Description
actionsRequired

PrivateLinkServiceConnectionStateActionsRequire

The actions required for private link service connection.

description

string

The private link service connection description.

status

PrivateLinkServiceConnectionStateStatus

The private link service connection status.

PrivateLinkServiceConnectionStateStatus

The private link service connection status.

Name Type Description
Approved

string

Disconnected

string

Pending

string

Rejected

string

ResourceIdentity

Azure Active Directory identity configuration for a resource.

Name Type Description
principalId

string

The Azure Active Directory principal id.

tenantId

string

The Azure Active Directory tenant id.

type

IdentityType

The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.

userAssignedIdentities

<string,  UserIdentity>

The resource ids of the user assigned identities to use

Server

An Azure SQL Database server.

Name Type Description
id

string

Resource ID.

identity

ResourceIdentity

The Azure Active Directory identity of the server.

kind

string

Kind of sql server. This is metadata used for the Azure portal experience.

location

string

Resource location.

name

string

Resource name.

properties.administratorLogin

string

Administrator username for the server. Once created it cannot be changed.

properties.administratorLoginPassword

string

The administrator login password (required for server creation).

properties.administrators

ServerExternalAdministrator

The Azure Active Directory administrator of the server.

properties.federatedClientId

string

The Client id used for cross tenant CMK scenario

properties.fullyQualifiedDomainName

string

The fully qualified domain name of the server.

properties.keyId

string

A CMK URI of the key to use for encryption.

properties.minimalTlsVersion

string

Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'

properties.primaryUserAssignedIdentityId

string

The resource id of a user assigned identity to be used by default.

properties.privateEndpointConnections

ServerPrivateEndpointConnection[]

List of private endpoint connections on a server

properties.publicNetworkAccess

ServerNetworkAccessFlag

Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'

properties.restrictOutboundNetworkAccess

ServerNetworkAccessFlag

Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'

properties.state

string

The state of the server.

properties.version

string

The version of the server.

properties.workspaceFeature

ServerWorkspaceFeature

Whether or not existing server has a workspace created and if it allows connection from workspace

tags

object

Resource tags.

type

string

Resource type.

ServerExternalAdministrator

Properties of a active directory administrator.

Name Type Description
administratorType

AdministratorType

Type of the sever administrator.

azureADOnlyAuthentication

boolean

Azure Active Directory only Authentication enabled.

login

string

Login name of the server administrator.

principalType

PrincipalType

Principal Type of the sever administrator.

sid

string

SID (object ID) of the server administrator.

tenantId

string

Tenant ID of the administrator.

ServerListResult

A list of servers.

Name Type Description
nextLink

string

Link to retrieve next page of results.

value

Server[]

Array of results.

ServerNetworkAccessFlag

Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'

Name Type Description
Disabled

string

Enabled

string

ServerPrivateEndpointConnection

A private endpoint connection under a server

Name Type Description
id

string

Resource ID.

properties

PrivateEndpointConnectionProperties

Private endpoint connection properties

ServerWorkspaceFeature

Whether or not existing server has a workspace created and if it allows connection from workspace

Name Type Description
Connected

string

Disconnected

string

UserIdentity

Azure Active Directory identity configuration for a resource.

Name Type Description
clientId

string

The Azure Active Directory client id.

principalId

string

The Azure Active Directory principal id.