Skip to main content
Glama

Outlook Meetings Scheduler MCP Server

auth.ts1.37 kB
import { AuthenticationResult, ClientCredentialRequest, ConfidentialClientApplication, Configuration } from "@azure/msal-node"; import { logger } from "./logger.js"; export default class Auth { private config: Configuration; private cca: ConfidentialClientApplication; constructor(clientId: string, clientSecret: string, tenantId: string) { this.config = { auth: { clientId, clientSecret, authority: `https://login.microsoftonline.com/${tenantId}/` } } this.cca = new ConfidentialClientApplication(this.config); } async getAccessToken(): Promise<string | null> { logger.progress("⌛ Getting access token..."); try{ const clientCredentialRequest: ClientCredentialRequest = { scopes: ["https://graph.microsoft.com/.default"], skipCache: true }; const response: AuthenticationResult | null = await this.cca.acquireTokenByClientCredential(clientCredentialRequest); const accessToken: string | undefined = response?.accessToken; logger.info("✅ Got access token"); return accessToken || null; } catch (error) { logger.error("🚨 Error in getAccessToken function.", error); return null; } } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/anoopt/outlook-meetings-scheduler-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server