Microsoft.Search searchServices

The searchServices resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.Search/searchServices resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.Search/searchServices@2021-04-01-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  sku: {
    name: 'string'
  identity: {
    type: 'string'
    userAssignedIdentities: {}
  properties: {
    authOptions: {
      aadOrApiKey: {
        aadAuthFailureMode: 'string'
      apiKeyOnly: any()
    disabledDataExfiltrationOptions: 'string'
    disableLocalAuth: bool
    encryptionWithCmk: {
      enforcement: 'string'
    hostingMode: 'string'
    networkRuleSet: {
      bypass: 'None'
      ipRules: [
          value: 'string'
    partitionCount: int
    publicNetworkAccess: 'string'
    replicaCount: int
    semanticSearch: 'string'

Property values


Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
name The resource name string (required)
location The geo-location where the resource lives string (required)
tags Resource tags. Dictionary of tag names and values. See Tags in templates
sku Defines the SKU of an Azure Cognitive Search Service, which determines price tier and capacity limits. Sku
identity Details about the search service identity. A null value indicates that the search service has no identity assigned. Identity
properties Properties of the search service. SearchServiceProperties


Name Description Value
type The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an identity created by the system and a set of user assigned identities. The type 'None' will remove all identities from the service. 'None'
'SystemAssigned, UserAssigned'
userAssignedIdentities The list of user identities associated with the search service. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. object


Name Description Value
authOptions Defines the options for how the data plane API of a Search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. DataPlaneAuthOptions
disabledDataExfiltrationOptions A list of data exfiltration scenarios that are explicitly disallowed for the search service. Currently, the only supported value is 'All' to disable all possible data export scenarios with more fine grained controls planned for the future. String array containing any of:
disableLocalAuth When set to true, calls to the search service will not be permitted to utilize API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined. bool
encryptionWithCmk Describes a policy that determines how resources within the search service are to be encrypted with Customer Managed Keys. EncryptionWithCmk
hostingMode Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. 'default'
networkRuleSet Network specific rules that determine how the Azure Cognitive Search service may be reached. NetworkRuleSet
partitionCount The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. int
publicNetworkAccess This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. 'disabled'
replicaCount The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. int
semanticSearch Sets options that control the availability of semantic search. This configuration is only possible for certain Azure Cognitive Search SKUs in certain locations. 'disabled'


Name Description Value
aadOrApiKey Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. DataPlaneAadOrApiKeyAuthOption
apiKeyOnly Any object For Bicep, you can use the any() function.


Name Description Value
aadAuthFailureMode Describes what response the data plane API of a Search service would send for requests that failed authentication. 'http401WithBearerChallenge'


Name Description Value
enforcement Describes how a search service should enforce having one or more non customer encrypted resources. 'Disabled'


Name Description Value
bypass A specific data exfiltration scenario that is disabled for the service. 'None'
ipRules A list of IP restriction rules that defines the inbound network(s) with allowing access to the search service endpoint. At the meantime, all other public IP networks are blocked by the firewall. These restriction rules are applied only when the 'publicNetworkAccess' of the search service is 'enabled'; otherwise, traffic over public interface is not allowed even with any public IP rules, and private endpoint connections would be the exclusive access method. IpRule[]


Name Description Value
value Value corresponding to a single IPv4 address (eg., or an IP range in CIDR format (eg., to be allowed. string


Name Description Value
name The SKU of the search service. Valid values include: 'free': Shared service. 'basic': Dedicated service with up to 3 replicas. 'standard': Dedicated service with up to 12 partitions and 12 replicas. 'standard2': Similar to standard, but with more capacity per search unit. 'standard3': The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports 2TB per partition, up to 12 partitions.' 'basic'

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Web App with a SQL Database, Azure Cosmos DB, Azure Search

Deploy to Azure
This template provisions a Web App, a SQL Database, Azure Cosmos DB, Azure Search and Application Insights.
Azure Cognitive Search service

Deploy to Azure
This template creates an Azure Cognitive Search service