Open tonswart opened 4 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @shawnxzq, @lmy269.
DataFactory team, please help to look into this question. It seems response payload is not consistent with SDK.
@tonswart Looks like one of your linked service includes invalid properties, could you please using PS to get the linked service one by one to identify which one caused the issue? Then please go the UI to check and share you json code your problematic linked service? thanks!
No more response, close it for now, and feel free to open new case if it is still not resolved.
A little late response due to holiday celebrations.
The issue is in the Linked Service 'Rest_AFAS_Service
'. We want to use the keyvault for Url, Username and Password and editted the JSON by hand because the Azure Datafactory GUI doen't support this. Azure Datafactory, LinkedService and pipelines works, but cmdlet Get-AzDataFactoryV2LinkedService fails on this one.
JSON code:
{
"name": "Rest_AFAS_Service",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"type": "RestService",
"annotations": [],
"typeProperties": {
"url": "@{linkedService().BaseUrl}",
"enableServerCertificateValidation": true,
"authenticationType": "Basic",
"userName": "@{linkedService().Username}",
"password": "@{linkedService().Password}"
},
"parameters": {
"Username": {
"type": "String"
},
"Password": {
"type": "String"
},
"BaseUrl": {
"type": "String"
}
}
}
}
Hi @shawnxzq , please follow up
@tonswart Generally, we don't suggest parameterize the "password" directly, as it is a credential and it needs special handling which is missing for parameter value. Instead, you can put you credential in AKV, and parameterize the secret name of the AKV credential if you need it.
Here is the document on how to use AKV credential: https://docs.microsoft.com/en-us/azure/data-factory/store-credentials-in-key-vault#reference-secret-stored-in-key-vault The "secretName" can be parameterized as any other normal properties.
Shared solution to customer and no further feedback from customer, close the issue.
This still needs to be fixed in the Powershell cmdlet to not throw the error. I am managing a large number of subscriptions where I don't control how resources get created. Part of managing these subs is deleting unused data factories, which requires removing ADF LinkedServices. To do this I am trying to use Get-AzDataFactoryV2LinkedService, but since that cmdlet fails my script is not able to remove those linked services.
Description
Get-AzDataFactoryV2LinkedService always produces the following error.
Steps to reproduce
Environment data
Module versions
Debug output
Error output