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/synapse-analytics/sql/develop-openrowset.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ This is a quick and easy way to read the content of the files without pre-config
43
43
This option enables you to configure location of the storage account in the data source and specify the authentication method that should be used to access storage.
44
44
45
45
> [!IMPORTANT]
46
-
>`OPENROWSET` without `DATA_SOURCE` provides quick and easy way to access the storage files but offers limited authentication options. As an example, Azure AD principal can access files only using their [Azure AD identity](develop-storage-files-storage-access-control.md#user-identity) and cannot access publicly available files. If you need more powerful authentication options, use `DATA_SOURCE` option and define credential that you want to use to access storage.
46
+
>`OPENROWSET` without `DATA_SOURCE` provides quick and easy way to access the storage files but offers limited authentication options. As an example, Azure AD principal can access files only using their [Azure AD identity](develop-storage-files-storage-access-control.md?tabs=user-identity#force-azure-ad-pass-through) and cannot access publicly available files. If you need more powerful authentication options, use `DATA_SOURCE` option and define credential that you want to use to access storage.
47
47
48
48
## Security
49
49
@@ -53,9 +53,9 @@ The storage administrator must also enable a user to access the files by providi
53
53
54
54
`OPENROWSET` use the following rules to determine how to authenticate to storage:
55
55
-In`OPENROWSET` with `DATA_SOURCE` the authentication mechanism depends on caller type.
56
-
- AAD logins can access files only using their own [Azure AD identity](develop-storage-files-storage-access-control.md#user-identity) if Azure storage allows the Azure AD user to access underlying files (for example, if the caller has Storage Reader permission on storage) and if you [enable Azure AD passthrough authentication](develop-storage-files-storage-access-control.md#force-azure-ad-pass-through) on Synapse SQL service.
56
+
- AAD logins can access files only using their own [Azure AD identity](develop-storage-files-storage-access-control.md?tabs=user-identity#force-azure-ad-pass-through) if Azure storage allows the Azure AD user to access underlying files (for example, if the caller has Storage Reader permission on storage) and if you [enable Azure AD passthrough authentication](develop-storage-files-storage-access-control.md#force-azure-ad-pass-through) on Synapse SQL service.
57
57
- SQL logins can also use `OPENROWSET` without `DATA_SOURCE` to access publicly available files, files protected using SAS token or Managed Identity of Synapse workspace. You would need to [create server-scoped credential](develop-storage-files-storage-access-control.md#examples) to allow access to storage files.
58
-
-In`OPENROWSET` with `DATA_SOURCE` authentication mechanism is defined in database scoped credential assigned to the referenced data source. This option enables you to access publicly available storage, or access storage using SAS token, Managed Identity of workspace, or [Azure AD identity of caller](develop-storage-files-storage-access-control.md#user-identity) (if caller is Azure AD principal). If `DATA_SOURCE` references Azure storage that is not public, you would need to [create database-scoped credential](develop-storage-files-storage-access-control.md#examples) and reference it in `DATA SOURCE` to allow access to storage files.
58
+
-In`OPENROWSET` with `DATA_SOURCE`the authentication mechanism is defined inthe database scoped credential assigned to the referenced data source. This option enables you to access publicly available storage, or access storage using SAS token, Managed Identity of workspace, or [Azure AD identity of caller](develop-storage-files-storage-access-control.md?tabs=user-identity#) (if caller is Azure AD principal). If `DATA_SOURCE` references Azure storage that is not public, you would need to [create database-scoped credential](develop-storage-files-storage-access-control.md#examples) and reference it in `DATA SOURCE` to allow access to storage files.
59
59
60
60
Caller must have `REFERENCES` permission on credential to use it to authenticate to storage.
Copy file name to clipboardExpand all lines: articles/synapse-analytics/sql/develop-storage-files-storage-access-control.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,9 +23,10 @@ This article describes the types of credentials you can use and how credential l
23
23
24
24
A user that has logged into a SQL on-demand resource must be authorized to access and query the files in Azure Storage if the files are not publicly available. Three authorization types are supported:
> [Azure AD pass-through](#force-azure-ad-pass-through) is the default behavior when you create a workspace. If you use it, you don't need to create credentials for each storage account accessed using Azure AD logins. You can [disable this behavior](#disable-forcing-azure-ad-pass-through).
@@ -44,7 +45,7 @@ You can get an SAS token by navigating to the **Azure portal -> Storage Account
44
45
45
46
You need to create database-scoped or server-scoped credential to enable access using SAS token.
46
47
47
-
### User Identity
48
+
### [User Identity](#tab/user-identity)
48
49
49
50
**User Identity**, also known as "pass-through", is an authorization type where the identity of the Azure AD user that logged into
50
51
SQL on-demand is used to authorize data access. Before accessing the data, the Azure Storage administrator must grant permissions to the Azure AD user. As indicated in the table above, it's not supported for the SQL user type.
@@ -88,13 +89,13 @@ DROP CREDENTIAL [UserIdentity];
88
89
89
90
If you want to re-enable it again, refer to the [force Azure AD pass-through](#force-azure-ad-pass-through) section.
90
91
91
-
### Managed Identity
92
+
### [Managed Identity](#tab/managed-identity)
92
93
93
94
**Managed Identity** is also known as MSI. It's a feature of Azure Active Directory (Azure AD) that provides Azure services for SQL on-demand. Also, it deploys an automatically managed identity in Azure AD. This identity can be used to authorize the request for data access in Azure Storage.
94
95
95
96
Before accessing the data, the Azure Storage administrator must grant permissions to Managed Identity for accessing the data. Granting permissions to Managed Identity is done the same way as granting permission to any other Azure AD user.
96
97
97
-
### Anonymous access
98
+
### [Anonymous access](#tab/public-access)
98
99
99
100
You can access publicly available files placed on Azure storage accounts that [allow anonymous access](/azure/storage/blobs/storage-manage-access-to-resources.md).
100
101
@@ -168,7 +169,7 @@ Server-level CREDENTIAL name must match the full path to the storage account (an
168
169
169
170
Server-scoped credentials enable access to Azure storage using the following authentication types:
The following script creates a server-level credential that can be used by `OPENROWSET` function to access any file on Azure storage using SAS token. Create this credential to enable SQL principal that executes `OPENROWSET` function to read files protected
174
175
with SAS key on the Azure storage that matches URL in credential name.
@@ -182,7 +183,7 @@ WITH IDENTITY='SHARED ACCESS SIGNATURE'
182
183
GO
183
184
```
184
185
185
-
### User Identity
186
+
### [User Identity](#tab/user-identity)
186
187
187
188
The following script creates a server-level credential that enables user to impersonate using Azure AD identity.
The following script creates a server-level credential that can be used by `OPENROWSET` function to access any file on Azure storage using workspace managed identity.
The following script creates a server-level credential that can be used by `OPENROWSET` function to access any file on publicly available Azure storage. Create this credential to enable SQL principal that executes `OPENROWSET` function to read publicly available files on Azure storage that matches URL in credential name.
206
207
@@ -220,7 +221,7 @@ Database-scoped credentials are used when any principal calls `OPENROWSET` funct
220
221
221
222
Database-scoped credentials enable access to Azure storage using the following authentication types:
The following script creates a database-scoped credential that is used by [external table](develop-tables-external-tables.md) and `OPENROWSET` functions that use data source with credential to access storage files using their own Azure AD identity.
236
237
@@ -240,7 +241,7 @@ WITH IDENTITY = 'User Identity';
240
241
GO
241
242
```
242
243
243
-
### Managed Identity
244
+
### [Managed Identity](#tab/managed-identity)
244
245
245
246
The following script creates a database-scoped credential that can be used to impersonate current Azure AD user as Managed Identity of service.
0 commit comments