Skip to content

Commit fc150d3

Browse files
Merge pull request #210378 from zeinab-mk/patch-19
Update Synapse scan auth options
2 parents bfaf666 + 6dbdb1d commit fc150d3

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

articles/purview/register-scan-synapse-workspace.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: viseshag
66
ms.service: purview
77
ms.subservice: purview-data-map
88
ms.topic: how-to
9-
ms.date: 08/10/2022
9+
ms.date: 09/06/2022
1010
ms.custom: template-how-to, ignite-fall-2021
1111
---
1212

@@ -137,10 +137,11 @@ The steps below will set permissions for all three.
137137

138138
### Apply permissions to scan the contents of the workspace
139139

140-
You can set up authentication for an Azure Synapse source in either of two ways. Select your scenario below for steps to apply permissions.
140+
You can set up authentication for an Azure Synapse source any of the following options. Select your scenario below for steps to apply permissions.
141141

142142
- Use a managed identity
143143
- Use a service principal
144+
- Use SQL Authentication
144145

145146
> [!IMPORTANT]
146147
> These steps for serverless databases **do not** apply to replicated databases. Currently in Synapse, serverless databases that are replicated from Spark databases are read-only. For more information, go [here](../synapse-analytics/sql/resources-self-help-sql-on-demand.md#operation-isnt-allowed-for-a-replicated-database).
@@ -229,6 +230,45 @@ GRANT REFERENCES ON DATABASE SCOPED CREDENTIAL::[scoped_credential] TO [PurviewA
229230
ALTER ROLE db_datareader ADD MEMBER [ServicePrincipalID];
230231
```
231232

233+
# [SQL Authentication](#tab/SQLAuth)
234+
235+
#### Use SQL Authentication for dedicated SQL databases
236+
237+
> [!NOTE]
238+
> You must first set up a new *credential* of type *SQL Authentication* by following the instructions in [Credentials for source authentication in Microsoft Purview](manage-credentials.md).
239+
240+
1. Go to your **Azure Synapse workspace**.
241+
1. Go to the **Data** section, and then look for one of your dedicated SQL databases.
242+
1. Select the ellipsis (**...**) next to it, and then start a new SQL script.
243+
1. Add the **SQL Authentication login name** as **db_datareader** on the dedicated SQL database. You do so by running the following command in your SQL script:
244+
245+
```sql
246+
CREATE USER [SQLUser] FROM LOGIN [SQLUser];
247+
GO
248+
249+
EXEC sp_addrolemember 'db_datareader', [SQLUser];
250+
GO
251+
```
252+
253+
> [!NOTE]
254+
> Repeat the previous step for all dedicated SQL databases in your Synapse workspace.
255+
256+
#### Use SQL Authentication for serverless SQL databases
257+
258+
1. Go to your Azure Synapse workspace.
259+
1. Go to the **Data** section, and then look for one of your serverless SQL databases.
260+
1. Select the ellipsis (**...**) next to it, and then start a new SQL script.
261+
1. Add the **SQL Authentication login name** on the serverless SQL databases. You do so by running the following command in your SQL script:
262+
```sql
263+
CREATE USER [SQLUser] FROM LOGIN [SQLUser];
264+
GO
265+
```
266+
267+
1. Add **Service Principal ID** as **db_datareader** on each of the serverless SQL databases you want to scan. You do so by running the following command in your SQL script:
268+
```sql
269+
ALTER ROLE db_datareader ADD MEMBER [SQLUser];
270+
GO
271+
```
232272
---
233273

234274
### Set up Azure Synapse workspace firewall access

0 commit comments

Comments
 (0)