Skip to content

Commit e3d5525

Browse files
committed
docs: streamline README authentication section and fix broken link
- Simplified authentication guidance to single OAuth documentation link - Corrected 'bulk methods' to 'batch operations' to match actual API - Fixed broken Dataverse SDK for .NET link (404 -> working URL) - Enhanced troubleshooting with specific common fixes - Added missing limitations and production credential guidance - Validated all external links for accuracy and functionality
1 parent 6b49320 commit e3d5525

1 file changed

Lines changed: 27 additions & 24 deletions

File tree

README.md

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,9 @@ A Python client library for Microsoft Dataverse that provides a unified interfac
4444

4545
### Prerequisites
4646

47-
- **Python 3.10+** (3.10, 3.11, 3.12, 3.13 supported)
48-
- **Azure Identity credentials** - Configure authentication using one of:
49-
- Interactive browser authentication (development)
50-
- Service principal with client secret (production)
51-
- Managed identity (Azure-hosted applications)
52-
- Device code flow (headless development environments)
53-
- **Microsoft Dataverse environment** - Access to a Power Platform environment with appropriate permissions
47+
- **Python 3.10+** (3.10, 3.11, 3.12, 3.13 supported)
48+
- **Microsoft Dataverse environment** with appropriate permissions
49+
- **OAuth authentication configured** for your application
5450

5551
### Install the package
5652

@@ -71,27 +67,30 @@ pip install -e .
7167

7268
### Authenticate the client
7369

74-
The client requires Azure Identity credentials. You can use various credential types:
70+
The client requires any Azure Identity `TokenCredential` implementation for OAuth authentication with Dataverse:
7571

7672
```python
77-
from azure.identity import InteractiveBrowserCredential
73+
from azure.identity import (
74+
InteractiveBrowserCredential,
75+
ClientSecretCredential,
76+
ClientCertificateCredential,
77+
AzureCliCredential
78+
)
7879
from PowerPlatform.Dataverse import DataverseClient
7980

80-
# For development - interactive browser authentication
81-
credential = InteractiveBrowserCredential()
81+
# Development options
82+
credential = InteractiveBrowserCredential() # Browser authentication
83+
# credential = AzureCliCredential() # If logged in via 'az login'
8284

83-
# For production - service principal authentication
85+
# Production options
8486
# credential = ClientSecretCredential(tenant_id, client_id, client_secret)
87+
# credential = ClientCertificateCredential(tenant_id, client_id, cert_path)
8588

86-
# For headless environments
87-
# credential = DeviceCodeCredential()
88-
89-
client = DataverseClient(
90-
base_url="https://yourorg.crm.dynamics.com",
91-
credential=credential
92-
)
89+
client = DataverseClient("https://yourorg.crm.dynamics.com", credential)
9390
```
9491

92+
> **Complete authentication setup**: See **[Use OAuth with Dataverse](https://learn.microsoft.com/power-apps/developer/data-platform/authenticate-oauth)** for app registration, all credential types, and security configuration.
93+
9594
## Key concepts
9695

9796
The SDK provides a simple, pythonic interface for Dataverse operations:
@@ -242,7 +241,7 @@ For comprehensive information on Microsoft Dataverse and related technologies:
242241
| **[Dataverse Web API Reference](https://learn.microsoft.com/power-apps/developer/data-platform/webapi/)** | Detailed Web API reference and examples |
243242
| **[Azure Identity for Python](https://learn.microsoft.com/python/api/overview/azure/identity-readme)** | Authentication library documentation and credential types |
244243
| **[Power Platform Developer Center](https://learn.microsoft.com/power-platform/developer/)** | Broader Power Platform development resources |
245-
| **[Dataverse SDK for .NET](https://learn.microsoft.com/power-apps/developer/data-platform/dataverse-sdk-dotnet/)** | Official .NET SDK for Microsoft Dataverse |
244+
| **[Dataverse SDK for .NET](https://learn.microsoft.com/power-apps/developer/data-platform/org-service/overview)** | Official .NET SDK for Microsoft Dataverse |
246245

247246
## Troubleshooting
248247

@@ -268,25 +267,29 @@ except ValidationError as e:
268267

269268
### Authentication issues
270269

271-
- Ensure your credential has proper permissions to access Dataverse
272-
- Verify the `base_url` format: `https://yourorg.crm.dynamics.com`
273-
- Check that required Azure Identity environment variables are set
270+
**Common fixes:**
271+
- Verify environment URL format: `https://yourorg.crm.dynamics.com` (no trailing slash)
272+
- Ensure Azure Identity credentials have proper Dataverse permissions
273+
- Check app registration permissions are granted and admin-consented
274274

275275
### Performance considerations
276276

277277
For optimal performance in production environments:
278278

279279
| Best Practice | Description |
280280
|---------------|-------------|
281-
| **Bulk Operations** | Use bulk methods for multiple records instead of individual operations |
281+
| **Batch Operations** | Pass lists to `create()`, `update()`, and `delete()` for automatic bulk processing |
282282
| **Select Fields** | Specify `select` parameter to limit returned columns and reduce payload size |
283283
| **Page Size Control** | Use `top` and `page_size` parameters to control memory usage |
284284
| **Connection Reuse** | Reuse `DataverseClient` instances across operations |
285+
| **Production Credentials** | Use `ClientSecretCredential` or `ClientCertificateCredential` for unattended operations |
285286
| **Error Handling** | Implement retry logic for transient errors (`e.is_transient`) |
286287

287288
### Limitations
288289

289290
- SQL queries are **read-only** and support a limited subset of SQL syntax
291+
- Create Table supports a limited number of column types.
292+
- Creating relationships between tables is not yet supported.
290293
- File uploads are limited by Dataverse file size restrictions (default 128MB per file)
291294
- Custom table creation requires appropriate security privileges in the target environment
292295
- Rate limits apply based on your Power Platform license and environment configuration

0 commit comments

Comments
 (0)