plugins/dataverse/skills/dataverse-web-apps/SKILL.md
# dataverse-web-apps This skill provides guidance on building web applications (any language) that connect to Microsoft Dataverse. Use when users ask about ".NET Dataverse", "Node.js Dataverse", "JavaScript Dataverse", "REST API Dataverse", "web app Dataverse", "OAuth Dataverse", or need help with web application integration. ## Dataverse Web API All languages can access Dataverse via the OData Web API. **Base URL:** `https://yourorg.api.crm.dynamics.com/api/data/v9.2/` ### Authentication
npx skillsauth add sahib-sawhney-wh/sahibs-claude-plugin-marketplace plugins/dataverse/skills/dataverse-web-appsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides guidance on building web applications (any language) that connect to Microsoft Dataverse. Use when users ask about ".NET Dataverse", "Node.js Dataverse", "JavaScript Dataverse", "REST API Dataverse", "web app Dataverse", "OAuth Dataverse", or need help with web application integration.
All languages can access Dataverse via the OData Web API.
Base URL: https://yourorg.api.crm.dynamics.com/api/data/v9.2/
Dataverse uses OAuth 2.0. Get an access token first:
POST https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded
client_id={app_id}
&client_secret={secret}
&scope=https://yourorg.crm.dynamics.com/.default
&grant_type=client_credentials
List records:
GET /api/data/v9.2/accounts?$select=name,telephone1&$top=10
Authorization: Bearer {access_token}
Get single record:
GET /api/data/v9.2/accounts({guid})
Authorization: Bearer {access_token}
Create record:
POST /api/data/v9.2/accounts
Authorization: Bearer {access_token}
Content-Type: application/json
{"name": "New Account", "telephone1": "555-0100"}
Update record:
PATCH /api/data/v9.2/accounts({guid})
Authorization: Bearer {access_token}
Content-Type: application/json
{"telephone1": "555-0200"}
Delete record:
DELETE /api/data/v9.2/accounts({guid})
Authorization: Bearer {access_token}
const axios = require('axios');
const { ConfidentialClientApplication } = require('@azure/msal-node');
// Authentication
const msalConfig = {
auth: {
clientId: process.env.AZURE_CLIENT_ID,
clientSecret: process.env.AZURE_CLIENT_SECRET,
authority: `https://login.microsoftonline.com/${process.env.AZURE_TENANT_ID}`
}
};
const cca = new ConfidentialClientApplication(msalConfig);
async function getToken() {
const result = await cca.acquireTokenByClientCredential({
scopes: [`${process.env.DATAVERSE_URL}/.default`]
});
return result.accessToken;
}
// Dataverse client
class DataverseClient {
constructor(baseUrl) {
this.baseUrl = `${baseUrl}/api/data/v9.2`;
}
async request(method, path, data = null) {
const token = await getToken();
const response = await axios({
method,
url: `${this.baseUrl}${path}`,
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json',
'OData-MaxVersion': '4.0',
'OData-Version': '4.0'
},
data
});
return response.data;
}
async listAccounts() {
return this.request('get', '/accounts?$select=name,telephone1&$top=100');
}
async createAccount(data) {
return this.request('post', '/accounts', data);
}
}
using Microsoft.Identity.Client;
using System.Net.Http;
using System.Net.Http.Headers;
public class DataverseClient
{
private readonly HttpClient _httpClient;
private readonly string _baseUrl;
private readonly IConfidentialClientApplication _app;
public DataverseClient(string baseUrl, string tenantId, string clientId, string clientSecret)
{
_baseUrl = $"{baseUrl}/api/data/v9.2";
_httpClient = new HttpClient();
_app = ConfidentialClientApplicationBuilder
.Create(clientId)
.WithClientSecret(clientSecret)
.WithAuthority($"https://login.microsoftonline.com/{tenantId}")
.Build();
}
private async Task<string> GetTokenAsync()
{
var result = await _app.AcquireTokenForClient(
new[] { $"{_baseUrl}/.default" }
).ExecuteAsync();
return result.AccessToken;
}
public async Task<string> ListAccountsAsync()
{
var token = await GetTokenAsync();
_httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", token);
var response = await _httpClient.GetAsync(
$"{_baseUrl}/accounts?$select=name,telephone1"
);
return await response.Content.ReadAsStringAsync();
}
}
references/dotnet-client.md for .NET examplesreferences/nodejs-client.md for Node.js examplesreferences/oauth-flows.md for authentication detailstools
# dataverse-sdk This skill provides guidance on using the PowerPlatform Dataverse Client SDK for Python. Use when users ask about "Dataverse SDK", "Dataverse Python", "DataverseClient", "Dataverse authentication", "Dataverse CRUD operations", "create Dataverse records", "query Dataverse", "Dataverse connection", or need help with the Microsoft Dataverse Python SDK. ## Quick Start Install the SDK: ```bash pip install PowerPlatform-Dataverse-Client azure-identity ``` Basic setup: ```python fro
tools
# dataverse-schema-design This skill provides guidance on designing Dataverse table schemas and data models. Use when users ask about "Dataverse table design", "Dataverse schema", "Dataverse relationships", "Dataverse columns", "data modeling Dataverse", "Dataverse best practices", or need help designing their data structure. ## Table Design Fundamentals ### Naming Conventions - **Table prefix**: Use publisher prefix (e.g., `new_`, `cr123_`) - **Table names**: PascalCase, singular (e.g., `new
tools
# dataverse-queries This skill provides guidance on querying data from Microsoft Dataverse. Use when users ask about "Dataverse query", "OData filter", "Dataverse SQL", "FetchXML", "query Dataverse records", "Dataverse filter syntax", "search Dataverse", or need help constructing queries. ## Query Methods The Dataverse SDK supports two query methods: 1. **OData queries** - Standard Web API query syntax 2. **SQL queries** - T-SQL-like syntax (read-only) ## OData Query Basics ```python # Basi
tools
# dataverse-python-apps This skill provides guidance on building Python applications that use Microsoft Dataverse as a database. Use when users ask about "Python Dataverse app", "Flask Dataverse", "FastAPI Dataverse", "Dataverse backend", "Python API with Dataverse", "Dataverse data pipeline", or need help building Python applications with Dataverse. ## Architecture Patterns ### Basic Application Structure ``` my-dataverse-app/ ├── app/ │ ├── __init__.py │ ├── dataverse_client.py # Dat