Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The factories/credentials resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DataFactory/factories/credentials resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.DataFactory/factories/credentials@2018-06-01' = {
parent: resourceSymbolicName
name: 'string'
properties: {
annotations: [
any(...)
]
description: 'string'
type: 'string'
// For remaining properties, see Credential objects
}
}
Credential objects
Set the type property to specify the type of object.
For ManagedIdentity, use:
{
type: 'ManagedIdentity'
typeProperties: {
resourceId: 'string'
}
}
For ServicePrincipal, use:
{
type: 'ServicePrincipal'
typeProperties: {
servicePrincipalId: any(...)
servicePrincipalKey: {
secretName: any(...)
secretVersion: any(...)
store: {
parameters: {
{customized property}: any(...)
}
referenceName: 'string'
type: 'string'
}
type: 'string'
}
tenant: any(...)
}
}
Property Values
Microsoft.DataFactory/factories/credentials
| Name | Description | Value |
|---|---|---|
| name | The resource name | string Constraints: Min length = 1 Max length = 127 Pattern = ^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$ (required) |
| parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: factories |
| properties | Properties of credentials. | Credential (required) |
AzureKeyVaultSecretReference
| Name | Description | Value |
|---|---|---|
| secretName | The name of the secret in Azure Key Vault. Type: string (or Expression with resultType string). | any (required) |
| secretVersion | The version of the secret in Azure Key Vault. The default value is the latest version of the secret. Type: string (or Expression with resultType string). | any |
| store | The Azure Key Vault linked service reference. | LinkedServiceReference (required) |
| type | Type of the secret. | string (required) |
Credential
| Name | Description | Value |
|---|---|---|
| annotations | List of tags that can be used for describing the Credential. | any[] |
| description | Credential description. | string |
| type | Set to 'ManagedIdentity' for type ManagedIdentityCredential. Set to 'ServicePrincipal' for type ServicePrincipalCredential. | 'ManagedIdentity' 'ServicePrincipal' (required) |
LinkedServiceReference
| Name | Description | Value |
|---|---|---|
| parameters | Arguments for LinkedService. | ParameterValueSpecification |
| referenceName | Reference LinkedService name. | string (required) |
| type | Linked service reference type. | 'LinkedServiceReference' (required) |
ManagedIdentityCredential
| Name | Description | Value |
|---|---|---|
| type | Type of credential. | 'ManagedIdentity' (required) |
| typeProperties | Managed identity credential properties. | ManagedIdentityTypeProperties |
ManagedIdentityTypeProperties
| Name | Description | Value |
|---|---|---|
| resourceId | The resource id of user assigned managed identity | string |
ParameterValueSpecification
| Name | Description | Value |
|---|
ServicePrincipalCredential
| Name | Description | Value |
|---|---|---|
| type | Type of credential. | 'ServicePrincipal' (required) |
| typeProperties | Service Principal credential properties. | ServicePrincipalCredentialTypeProperties (required) |
ServicePrincipalCredentialTypeProperties
| Name | Description | Value |
|---|---|---|
| servicePrincipalId | The app ID of the service principal used to authenticate | any |
| servicePrincipalKey | The key of the service principal used to authenticate. | AzureKeyVaultSecretReference |
| tenant | The ID of the tenant to which the service principal belongs | any |
Usage Examples
Bicep Samples
A basic example of deploying Data Factory credential resource.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource factory 'Microsoft.DataFactory/factories@2018-06-01' = {
name: resourceName
location: location
properties: {
publicNetworkAccess: 'Enabled'
repoConfiguration: null
}
}
resource userAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
name: resourceName
}
resource credential 'Microsoft.DataFactory/factories/credentials@2018-06-01' = {
parent: factory
name: resourceName
properties: {
annotations: [
'test'
]
description: 'this is a test'
type: 'ManagedIdentity'
typeProperties: {
resourceId: userAssignedIdentity.id
}
}
}
ARM template resource definition
The factories/credentials resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DataFactory/factories/credentials resource, add the following JSON to your template.
{
"type": "Microsoft.DataFactory/factories/credentials",
"apiVersion": "2018-06-01",
"name": "string",
"properties": {
"annotations": [ {} ],
"description": "string",
"type": "string"
// For remaining properties, see Credential objects
}
}
Credential objects
Set the type property to specify the type of object.
For ManagedIdentity, use:
{
"type": "ManagedIdentity",
"typeProperties": {
"resourceId": "string"
}
}
For ServicePrincipal, use:
{
"type": "ServicePrincipal",
"typeProperties": {
"servicePrincipalId": {},
"servicePrincipalKey": {
"secretName": {},
"secretVersion": {},
"store": {
"parameters": {
"{customized property}": {}
},
"referenceName": "string",
"type": "string"
},
"type": "string"
},
"tenant": {}
}
}
Property Values
Microsoft.DataFactory/factories/credentials
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2018-06-01' |
| name | The resource name | string Constraints: Min length = 1 Max length = 127 Pattern = ^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$ (required) |
| properties | Properties of credentials. | Credential (required) |
| type | The resource type | 'Microsoft.DataFactory/factories/credentials' |
AzureKeyVaultSecretReference
| Name | Description | Value |
|---|---|---|
| secretName | The name of the secret in Azure Key Vault. Type: string (or Expression with resultType string). | any (required) |
| secretVersion | The version of the secret in Azure Key Vault. The default value is the latest version of the secret. Type: string (or Expression with resultType string). | any |
| store | The Azure Key Vault linked service reference. | LinkedServiceReference (required) |
| type | Type of the secret. | string (required) |
Credential
| Name | Description | Value |
|---|---|---|
| annotations | List of tags that can be used for describing the Credential. | any[] |
| description | Credential description. | string |
| type | Set to 'ManagedIdentity' for type ManagedIdentityCredential. Set to 'ServicePrincipal' for type ServicePrincipalCredential. | 'ManagedIdentity' 'ServicePrincipal' (required) |
LinkedServiceReference
| Name | Description | Value |
|---|---|---|
| parameters | Arguments for LinkedService. | ParameterValueSpecification |
| referenceName | Reference LinkedService name. | string (required) |
| type | Linked service reference type. | 'LinkedServiceReference' (required) |
ManagedIdentityCredential
| Name | Description | Value |
|---|---|---|
| type | Type of credential. | 'ManagedIdentity' (required) |
| typeProperties | Managed identity credential properties. | ManagedIdentityTypeProperties |
ManagedIdentityTypeProperties
| Name | Description | Value |
|---|---|---|
| resourceId | The resource id of user assigned managed identity | string |
ParameterValueSpecification
| Name | Description | Value |
|---|
ServicePrincipalCredential
| Name | Description | Value |
|---|---|---|
| type | Type of credential. | 'ServicePrincipal' (required) |
| typeProperties | Service Principal credential properties. | ServicePrincipalCredentialTypeProperties (required) |
ServicePrincipalCredentialTypeProperties
| Name | Description | Value |
|---|---|---|
| servicePrincipalId | The app ID of the service principal used to authenticate | any |
| servicePrincipalKey | The key of the service principal used to authenticate. | AzureKeyVaultSecretReference |
| tenant | The ID of the tenant to which the service principal belongs | any |
Usage Examples
Terraform (AzAPI provider) resource definition
The factories/credentials resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DataFactory/factories/credentials resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DataFactory/factories/credentials@2018-06-01"
name = "string"
parent_id = "string"
body = {
properties = {
annotations = [
?
]
description = "string"
type = "string"
// For remaining properties, see Credential objects
}
}
}
Credential objects
Set the type property to specify the type of object.
For ManagedIdentity, use:
{
type = "ManagedIdentity"
typeProperties = {
resourceId = "string"
}
}
For ServicePrincipal, use:
{
type = "ServicePrincipal"
typeProperties = {
servicePrincipalId = ?
servicePrincipalKey = {
secretName = ?
secretVersion = ?
store = {
parameters = {
{customized property} = ?
}
referenceName = "string"
type = "string"
}
type = "string"
}
tenant = ?
}
}
Property Values
Microsoft.DataFactory/factories/credentials
| Name | Description | Value |
|---|---|---|
| name | The resource name | string Constraints: Min length = 1 Max length = 127 Pattern = ^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$ (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: factories |
| properties | Properties of credentials. | Credential (required) |
| type | The resource type | "Microsoft.DataFactory/factories/credentials@2018-06-01" |
AzureKeyVaultSecretReference
| Name | Description | Value |
|---|---|---|
| secretName | The name of the secret in Azure Key Vault. Type: string (or Expression with resultType string). | any (required) |
| secretVersion | The version of the secret in Azure Key Vault. The default value is the latest version of the secret. Type: string (or Expression with resultType string). | any |
| store | The Azure Key Vault linked service reference. | LinkedServiceReference (required) |
| type | Type of the secret. | string (required) |
Credential
| Name | Description | Value |
|---|---|---|
| annotations | List of tags that can be used for describing the Credential. | any[] |
| description | Credential description. | string |
| type | Set to 'ManagedIdentity' for type ManagedIdentityCredential. Set to 'ServicePrincipal' for type ServicePrincipalCredential. | 'ManagedIdentity' 'ServicePrincipal' (required) |
LinkedServiceReference
| Name | Description | Value |
|---|---|---|
| parameters | Arguments for LinkedService. | ParameterValueSpecification |
| referenceName | Reference LinkedService name. | string (required) |
| type | Linked service reference type. | 'LinkedServiceReference' (required) |
ManagedIdentityCredential
| Name | Description | Value |
|---|---|---|
| type | Type of credential. | 'ManagedIdentity' (required) |
| typeProperties | Managed identity credential properties. | ManagedIdentityTypeProperties |
ManagedIdentityTypeProperties
| Name | Description | Value |
|---|---|---|
| resourceId | The resource id of user assigned managed identity | string |
ParameterValueSpecification
| Name | Description | Value |
|---|
ServicePrincipalCredential
| Name | Description | Value |
|---|---|---|
| type | Type of credential. | 'ServicePrincipal' (required) |
| typeProperties | Service Principal credential properties. | ServicePrincipalCredentialTypeProperties (required) |
ServicePrincipalCredentialTypeProperties
| Name | Description | Value |
|---|---|---|
| servicePrincipalId | The app ID of the service principal used to authenticate | any |
| servicePrincipalKey | The key of the service principal used to authenticate. | AzureKeyVaultSecretReference |
| tenant | The ID of the tenant to which the service principal belongs | any |
Usage Examples
Terraform Samples
A basic example of deploying Data Factory credential resource.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "factory" {
type = "Microsoft.DataFactory/factories@2018-06-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
identity {
type = "UserAssigned"
identity_ids = [azapi_resource.userAssignedIdentity.id]
}
body = {
properties = {
publicNetworkAccess = "Enabled"
repoConfiguration = null
}
}
}
resource "azapi_resource" "userAssignedIdentity" {
type = "Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = azapi_resource.resourceGroup.location
}
resource "azapi_resource" "credential" {
type = "Microsoft.DataFactory/factories/credentials@2018-06-01"
parent_id = azapi_resource.factory.id
name = var.resource_name
body = {
properties = {
type = "ManagedIdentity"
annotations = ["test"]
description = "this is a test"
typeProperties = {
resourceId = azapi_resource.userAssignedIdentity.id
}
}
}
ignore_casing = false
ignore_missing_property = false
}