//deno-microsoft-graphbyRihanArfan

deno-microsoft-graph

Use Microsoft Graph API with OAuth 2.0 client credentials grant flow in Deno

1
0
1
TypeScript

deno-microsoft-graph

Microsoft Graph API client in Deno, with authentication via OAuth 2.0 client credentials grant flow.

Uses @microsoft/microsoft-graph-client under the hood.

Usage πŸ“–

See https://www.npmjs.com/package/@microsoft/microsoft-graph-client for usage of client.

  1. Create app registration by following this guide
  2. Set TENANT_ID, CLIENT_ID and CLIENT_SECRET environment variables in .env
// example.ts
import { client } from "https://raw.githubusercontent.com/RihanArfan/deno-microsoft-graph/v1.0.0/client.ts";
import type { User } from "npm:@microsoft/microsoft-graph-types";

const users: User[] = await client.api("/users").get();
console.log(users);
deno run --allow-env --allow-net --allow-read --allow-sys example.ts

Roadmap πŸš€

  • Client for init which accepts tenantId, clientId and
[beta]v0.14.0