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: sdk/tables/azure-data-tables/README.md
+37-7Lines changed: 37 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,7 @@ The `credential` parameter may be provided in a number of different forms, depen
55
55
* Shared Key
56
56
* Connection String
57
57
* Shared Access Signature Token
58
+
* TokenCredential(AAD)(Supported on Storage)
58
59
59
60
##### Creating the client from a shared key
60
61
To use an account [shared key][azure_shared_key] (aka account key or access key), provide the key as a string. This can be found in your storage account in the [Azure Portal][azure_portal_account_url] under the "Access Keys" section or by running the following Azure CLI command:
@@ -64,13 +65,17 @@ az storage account keys list -g MyResourceGroup -n MyStorageAccount
64
65
```
65
66
66
67
Use the key as the credential parameter to authenticate the client:
68
+
67
69
```python
68
-
from azure.core.credentials import AzureNamedKeyCredential
69
70
from azure.data.tables import TableServiceClient
71
+
from azure.core.credentials import AzureNamedKeyCredential
Azure Tables provides integration with Azure Active Directory(Azure AD) for identity-based authentication of requests to the Table service when targeting a Storage endpoint. With Azure AD, you can use role-based access control(RBAC) to grant access to your Azure Table resources to users, groups, or applications.
133
+
134
+
To access a table resource with a TokenCredential, the authenticated identity should have either the "Storage Table Data Contributor" or "Storage Table Data Reader" role.
135
+
136
+
With the `azure-identity` package, you can seamlessly authorize requests in both development and production environments. To learn more about Azure AD integration in Azure Storage, see the [azure-identity README](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/README.md)
0 commit comments