You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/data-factory/connector-rest.md
+63-3Lines changed: 63 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: jianleishen
6
6
ms.subservice: data-movement
7
7
ms.custom: synapse
8
8
ms.topic: conceptual
9
-
ms.date: 02/26/2024
9
+
ms.date: 08/29/2024
10
10
ms.author: makromer
11
11
---
12
12
@@ -140,12 +140,18 @@ Set the **authenticationType** property to **AadServicePrincipal**. In addition
140
140
| Property | Description | Required |
141
141
|:--- |:--- |:--- |
142
142
| servicePrincipalId | Specify the Microsoft Entra application's client ID. | Yes |
143
-
| servicePrincipalKey | Specify the Microsoft Entra application's key. Mark this field as a **SecureString** to store it securely in Data Factory, or [reference a secret stored in Azure Key Vault](store-credentials-in-key-vault.md). | Yes |
143
+
| servicePrincipalCredentialType | Specify the credential type to use for service principal authentication. Allowed values are `ServicePrincipalKey` and `ServicePrincipalCert`. | No |
144
+
|***For ServicePrincipalKey***|||
145
+
| servicePrincipalKey | Specify the Microsoft Entra application's key. Mark this field as a **SecureString** to store it securely in Data Factory, or [reference a secret stored in Azure Key Vault](store-credentials-in-key-vault.md). | No |
146
+
|***For ServicePrincipalCert***|||
147
+
| servicePrincipalEmbeddedCert | Specify the base64 encoded certificate of your application registered in Microsoft Entra ID, and ensure the certificate content type is **PKCS #12**. Mark this field as a **SecureString** to store it securely, or [reference a secret stored in Azure Key Vault](store-credentials-in-key-vault.md). Go to this [section](#save-the-service-principal-certificate-in-azure-key-vault) to learn how to save the certificate in Azure Key Vault. | No |
148
+
| servicePrincipalEmbeddedCertPassword | Specify the password of your certificate if your certificate is secured with a password. Mark this field as a **SecureString** to store it securely, or [reference a secret stored in Azure Key Vault](store-credentials-in-key-vault.md). | No |
149
+
||||
144
150
| tenant | Specify the tenant information (domain name or tenant ID) under which your application resides. Retrieve it by hovering the mouse in the top-right corner of the Azure portal. | Yes |
145
151
| aadResourceId | Specify the Microsoft Entra resource you are requesting for authorization, for example, `https://management.core.windows.net`.| Yes |
146
152
| azureCloudType | For Service Principal authentication, specify the type of Azure cloud environment to which your Microsoft Entra application is registered. <br/> Allowed values are **AzurePublic**, **AzureChina**, **AzureUsGovernment**, and **AzureGermany**. By default, the data factory's cloud environment is used. | No |
147
153
148
-
**Example**
154
+
**Example 1: Using service principal key authentication**
149
155
150
156
```json
151
157
{
@@ -156,6 +162,7 @@ Set the **authenticationType** property to **AadServicePrincipal**. In addition
156
162
"url": "<REST endpoint e.g. https://www.example.com/>",
"value": "<the base64 encoded certificate of your application registered in Microsoft Entra ID>"
196
+
},
197
+
"servicePrincipalEmbeddedCertPassword": {
198
+
"type": "SecureString",
199
+
"value": "<password of your certificate>"
200
+
},
201
+
"tenant": "<tenant info, e.g. microsoft.onmicrosoft.com>",
202
+
"aadResourceId": "<Azure AD resource URL e.g. https://management.core.windows.net>"
203
+
},
204
+
"connectVia": {
205
+
"referenceName": "<name of Integration Runtime>",
206
+
"type": "IntegrationRuntimeReference"
207
+
}
208
+
}
209
+
}
210
+
```
211
+
212
+
#### Save the service principal certificate in Azure Key Vault
213
+
214
+
You have two options to save the service principal certificate in Azure Key Vault:
215
+
216
+
-**Option 1**
217
+
218
+
1. Convert the service principal certificate to a base64 string. Learn more from this [article](https://blog.tekspace.io/convert-certificate-from-pfx-to-base64-with-powershell/).
219
+
220
+
221
+
2. Save the base64 string as a secret in Azure Key Vault.
222
+
223
+
:::image type="content" source="media/connector-rest/secrets.png" alt-text="Screenshot of secrets.":::
224
+
225
+
:::image type="content" source="media/connector-rest/secret-value.png" alt-text="Screenshot of secret value.":::
226
+
227
+
-**Option 2**
228
+
229
+
If you can't download the certificate from Azure Key Vault, you can use this [template](https://supportability.visualstudio.com/256c8350-cb4b-49c9-ac6e-a012aeb312d1/_apis/git/repositories/da6cf5d9-0dc5-4ba9-a5e2-6e6a93adf93c/Items?path=/AzureDataFactory/.attachments/ConvertCertToBase64StringInAKVPipeline-47f8e507-e7ef-4343-a73b-733b9a7f8e4e.zip&download=false&resolveLfs=true&%24format=octetStream&api-version=5.0-preview.1&sanitize=true&includeContentMetadata=true&versionDescriptor.version=master) to save the converted service principal certificate as a secret in Azure Key Vault.
230
+
231
+
:::image type="content" source="media/connector-rest/template-pipeline.png" alt-text="Screenshot of template pipeline to save service principal certificate as a secret in AKV.":::
232
+
173
233
### Use OAuth2 Client Credential authentication
174
234
175
235
Set the **authenticationType** property to **OAuth2ClientCredential**. In addition to the generic properties that are described in the preceding section, specify the following properties:
Copy file name to clipboardExpand all lines: articles/data-factory/connector-troubleshoot-rest.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to troubleshoot issues with the REST connector in Azure D
5
5
author: jianleishen
6
6
ms.subservice: data-movement
7
7
ms.topic: troubleshooting
8
-
ms.date: 10/20/2023
8
+
ms.date: 08/29/2024
9
9
ms.author: jianleishen
10
10
ms.custom: has-adal-ref, synapse
11
11
---
@@ -59,6 +59,12 @@ This article provides suggestions to troubleshoot common problems with the REST
59
59
60
60
Tools like **Fiddler** are recommended for the preceding case.
61
61
62
+
## The service principal certificate in Azure Key Vault is not correct
63
+
64
+
-**Message**: `"Failed to create certificate from certificate raw data and password. Cannot find the requested object."`
65
+
-**Cause**: Only support the base64 string service principal certificate for Rest connector service principal certificate authentication.
66
+
-**Recommendation**: Follow this [section](connector-rest.md#save-the-service-principal-certificate-in-azure-key-vault) to save the service principal certificate in Azure Key Vault correctly.
67
+
62
68
## Related content
63
69
64
70
For more troubleshooting help, try these resources:
0 commit comments