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
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,8 @@ 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:
@@ -44,7 +44,7 @@ You can get an SAS token by navigating to the **Azure portal -> Storage Account
44
44
45
45
You need to create database-scoped or server-scoped credential to enable access using SAS token.
46
46
47
-
### User Identity
47
+
### [User Identity](#tab/user-identity)
48
48
49
49
**User Identity**, also known as "pass-through", is an authorization type where the identity of the Azure AD user that logged into
50
50
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 +88,13 @@ DROP CREDENTIAL [UserIdentity];
88
88
89
89
If you want to re-enable it again, refer to the [force Azure AD pass-through](#force-azure-ad-pass-through) section.
90
90
91
-
### Managed Identity
91
+
### [Managed Identity](#tab/managed-identity)
92
92
93
93
**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
94
95
95
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
96
97
-
### Anonymous access
97
+
### [Anonymous access](#tab/public-access)
98
98
99
99
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
100
@@ -168,7 +168,7 @@ Server-level CREDENTIAL name must match the full path to the storage account (an
168
168
169
169
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
174
with SAS key on the Azure storage that matches URL in credential name.
@@ -182,7 +182,7 @@ WITH IDENTITY='SHARED ACCESS SIGNATURE'
182
182
GO
183
183
```
184
184
185
-
### User Identity
185
+
### [User Identity](#tab/user-identity)
186
186
187
187
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
206
@@ -220,7 +220,7 @@ Database-scoped credentials are used when any principal calls `OPENROWSET` funct
220
220
221
221
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
236
@@ -240,7 +240,7 @@ WITH IDENTITY = 'User Identity';
240
240
GO
241
241
```
242
242
243
-
### Managed Identity
243
+
### [Managed Identity](#tab/managed-identity)
244
244
245
245
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