question

MatthieuMarshall-2182 avatar image
0 Votes"
MatthieuMarshall-2182 asked BhargavaGunnam-MSFT commented

Internal error when trying to add user assigned managed identity to Azure Data Factory

I am trying to add a User Assigned Manager Identity to my Azure Data Factory instance, but I keep getting an InternalError.

I am generally trying to follow this guide https://techcommunity.microsoft.com/t5/azure-data-factory-blog/support-for-user-assigned-managed-identity-in-azure-data-factory/ba-p/2841013 .

It is the step where I add the managed identity as a User Managed Identity to the Azure Data Factory resource in Azure Portal where I am getting the InternalError. Has anyone else had this problem or know how I can overcome it?

The JSON response in the log is the following (with some bits removed):

{
"authorization": {
"action": "Microsoft.DataFactory/factories/write",
"scope": "/subscriptions/<subscription id>/resourceGroups/<resource group id>/providers/Microsoft.DataFactory/factories/<azure data factory name>"
},
"caller": "<email address>",
"channels": "Operation",
"claims": {
"aud": "https://management.core.windows.net/",
"iss": "https://sts.windows.net/<subscription id>/",
"iat": "",
"nbf": "",
"exp": "",
"http://schemas.microsoft.com/claims/authnclassreference": "1",
"aio": "",
"http://schemas.microsoft.com/claims/authnmethodsreferences": "pwd,rsa,mfa",
"appid": "",
"appidacr": "2",
"http://schemas.microsoft.com/2012/01/devicecontext/claims/identifier": "",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname": "",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname": "",
"groups": "",
"ipaddr": "",
"name": "",
"http://schemas.microsoft.com/identity/claims/objectidentifier": "",
"puid": "",
"rh": "",
"http://schemas.microsoft.com/identity/claims/scope": "user_impersonation",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier": "",
"http://schemas.microsoft.com/identity/claims/tenantid": "",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name": "",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn": "",
"uti": "",
"ver": "1.0",
"xms_tcdt": ""
},
"correlationId": "",
"description": "",
"eventDataId": "",
"eventName": {
"value": "EndRequest",
"localizedValue": "End request"
},
"category": {
"value": "Administrative",
"localizedValue": "Administrative"
},
"eventTimestamp": "2022-07-19T16:00:36.7005541Z",
"id": "/subscriptions/<subscription id>/resourceGroups/<resource group name>/providers/Microsoft.DataFactory/factories/wenl-rdsm-00-adf/events/",
"level": "Error",
"operationId": "c5515f3c-40d3-457e-a689-b158cbf9a451",
"operationName": {
"value": "Microsoft.DataFactory/factories/write",
"localizedValue": "Create or Update any Data Factory."
},
"resourceGroupName": "<resource group name>",
"resourceProviderName": {
"value": "Microsoft.DataFactory",
"localizedValue": "Microsoft.DataFactory"
},
"resourceType": {
"value": "Microsoft.DataFactory/factories",
"localizedValue": "Microsoft.DataFactory/factories"
},
"resourceId": "/subscriptions/<subscription id>/resourceGroups/<resource group name>/providers/Microsoft.DataFactory/factories/<azure data factory name>",
"status": {
"value": "Failed",
"localizedValue": "Failed"
},
"subStatus": {
"value": "InternalServerError",
"localizedValue": "Internal Server Error (HTTP Status Code: 500)"
},
"submissionTimestamp": "2022-07-19T16:01:37.2973463Z",
"subscriptionId": "",
"tenantId": "",
"properties": {
"statusCode": "InternalServerError",
"serviceRequestId": null,
"statusMessage": "{\"error\":{\"code\":\"InternalError\",\"message\":\"Internal error has occurred.\"}}",
"eventCategory": "Administrative",
"entity": "/subscriptions/<subscription id>/resourceGroups/<resource group name>/providers/Microsoft.DataFactory/factories/<data factory name>",
"message": "Microsoft.DataFactory/factories/write",
"hierarchy": ""
},
"relatedEvents": []
}


azure-data-factoryazure-managed-identity
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @MatthieuMarshall-2182,

Thanks for the question and using MS Q&A platform.

I have seen this error when user assigned managed identity and ADF are in different regions. Could you please confirm if both are in the same region? if they are not, can you create managed identity in the same region as ADF and try again?

and this could be a transient failure too. Please check and confirm?

0 Votes 0 ·

Thanks for your reply! Both the managed identity and the ADF are in the same region so unfortunately I don't think that is the cause of the issue.

I have tried it again today, and still getting the same error

0 Votes 0 ·

1 Answer

MatthieuMarshall-2182 avatar image
1 Vote"
MatthieuMarshall-2182 answered BhargavaGunnam-MSFT commented

My colleague was able to figure out the problem here.

We had a User Assigned Managed Identity added to the Azure Data Factory instance that had been deleted/no longer existed. Once we removed the inexistent User Assigned Managed Identity from the Azure Data Factory Managed Identities, we were then able to add the one that I wanted to add.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MatthieuMarshall-2182,
Glad to know that your issue is resolved. and thank you for sharing the resolution, this will help the community find answers faster by identifying the correct answer.

0 Votes 0 ·