Mohan Rayapuvari
Mohan Rayapuvari

Reputation: 421

Adding CMK(Customer Managed Key) failing for empty Azure data factory

Adding Customer managed key to brand new Data factory failing with below error message. Same error when i tried from Azure Portal or REST API (PUT https://management.azure.com/subscriptions/#####/resourceGroups/####/providers/Microsoft.DataFactory/factories/ )

I just created Data factory and it is empty. Following below link https://learn.microsoft.com/en-us/azure/data-factory/enable-customer-managed-key

{
  "error": {
    "code": "AddCMKToExistingFactoriesWithEntities",
    "message": "Update factory failed. You cannot add CMK settings for factories with existing entities",
    "target": null,
    "details": null
  }
}

Upvotes: 1

Views: 1320

Answers (3)

Jess
Jess

Reputation: 3715

I also encounter this issue, and nobody gives me a satisfactory answer in the community.

After a while, I found I shouldn't believe Azure UI in some situations. Especially for some unimportant features.

  1. Create ADF by Azure CLI (THIS IS IMPORTANT!!!)
az datafactory create --location "Japan East" \
--name "ADF-CMK" \
--resource-group "<YOUR GROUP>" 
  1. Copy the identity object ID of ADF

enter image description here

  1. Create an access policy

enter image description here

enter image description here

  1. input your CMK URL to your ADF

enter image description here


See also: https://learn.microsoft.com/en-us/azure/data-factory/data-factory-service-identity#retrieve-managed-identity

Upvotes: 0

Mohan Rayapuvari
Mohan Rayapuvari

Reputation: 421

Microsoft resolved this issue last week. Able to add CMK keys to new data factories with no entities.

Upvotes: 0

Himanshu Kumar Sinha
Himanshu Kumar Sinha

Reputation: 1786

Can I suggest you to please try and create a new test ADF and select the Enable encryption using CMK ? It should work that way .

enter image description here

Upvotes: 0

Related Questions