Vercel — AI · · 2 min read

Vercel Connect now supports Microsoft

Mirrored from Vercel — AI for archival readability. Support the source by reading on the original site.

Vercel Connect now includes a managed connector for Microsoft, so your apps and agents can access all Microsoft products such as Teams, OneDrive and more.

As a Vercel Managed Connector, Vercel registers the Entra application and configures federated credentials for it, so you don't have to create an app registration or manage client secrets yourself. Authorize the app for your Microsoft tenant once, then attach the connector to the projects and environments it needs.

Create a connector from the dashboard or the Vercel CLI:

# Create a Microsoft connector
vc connect create microsoft --name acme-msft
# Attach it to a project
vc connect attach microsoft/acme-msft --project my-app --environment production

Create a Microsoft connector and attach it to a project's production environment.

With the connector attached, your code requests a token only when it needs one. The @vercel/connect SDK authenticates with your deployment's OIDC identity and returns a short-lived token for the app itself, using the application permissions your admin granted:

app/lib/send-email.ts
import { getToken } from '@vercel/connect';
const token = await getToken('microsoft/acme-msft', {
subject: { type: 'app' },
scopes: ['https://graph.microsoft.com/.default'],
});
await fetch('https://graph.microsoft.com/v1.0/users/releases@acme.com/sendMail', {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
message: {
subject: 'Deploy finished',
body: { contentType: 'Text', content: 'Production is live ✅' },
toRecipients: [{ emailAddress: { address: 'eng@acme.com' } }],
},
}),
});

Request an app token and read an email through the Microsoft Graph API.

Each token is scoped to what you request and refreshed automatically, so there's nothing to leak or rotate. To act as a specific person instead, pass that user as the subject and the token carries their delegated permissions:

app/lib/act-as-user.ts
const token = await getToken('microsoft/acme-msft', {
subject: { type: 'user', id: userId },
scopes: ['User.Read'],
});

The token acts as this user, limited to what they authorized.

Read the Vercel Connect docs and create a Microsoft connector to get started.

Vercel Connect is in beta and available on all plans. Features and behavior, including available connectors and trigger forwarding, may change before general availability. Usage is subject to the Beta Agreement and Vercel Connect terms.

Contributors

Dima Voytenko, Raghav Agarwal

Discussion (0)

Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.

Sign in →

No comments yet. Sign in and be the first to say something.

More from Vercel — AI