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.
Provides guidance for building web applications that connect to Microsoft Dataverse using OAuth and REST APIs.
/plugin marketplace add Sahib-Sawhney-WH/dapr-claude-plugin/plugin install sahib-sawhney-wh-dataverse-plugins-dataverse@Sahib-Sawhney-WH/dapr-claude-pluginThis skill inherits all available tools. When active, it can use any tool Claude has access to.
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 detailsThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.