Skype's consumer API is largely deprecated — Microsoft ended support for the Skype Web SDK and Bot Framework for Skype in stages through 2023-2024. For Lovable integrations, the recommended path is Microsoft Graph API for Skype for Business (enterprise) or migrating to Microsoft Teams, which uses the same Microsoft identity OAuth2 and Graph API infrastructure. Store Microsoft identity credentials in Cloud → Secrets and call Graph API endpoints through a Supabase Edge Function.
Integrating Lovable with Skype via Microsoft Graph API
Skype's integration story is complicated by Microsoft's ongoing platform transition. The Skype Web SDK was deprecated in October 2021. Skype for Business Online was shut down in July 2021. The Skype Bot Framework for consumer Skype had API limitations enforced from 2019 onward. For most practical purposes, if you need to build communication features for a Microsoft ecosystem in 2026, Microsoft Teams is the current recommended platform — it uses the same Microsoft identity (Azure AD) OAuth2 and the same Microsoft Graph API, so the authentication code is identical.
That said, Skype for Business Server (the on-premises version) remains active in some enterprises, and accessing Skype for Business presence data and user information through Microsoft Graph API is still possible. The Graph API endpoint at https://graph.microsoft.com/v1.0/communications/ provides presence information, online meeting links (which create Teams meetings, not Skype meetings), and communication-related data for organizations using Microsoft 365.
This guide walks through the Microsoft Graph API approach: creating an Azure AD app registration, obtaining OAuth2 credentials, and building an Edge Function that can query user presence and create online meetings. The online meetings endpoint creates Teams meetings but is the current Microsoft standard for programmatic meeting creation across the Microsoft communication ecosystem — relevant if your organization uses Teams but your users refer to it in the context of 'Skype replacement'.
Integration method
Skype's consumer developer APIs are deprecated and no longer support new integrations. Enterprise Skype for Business integrations use Microsoft Graph API with Azure AD OAuth2 authentication. A Supabase Edge Function holds the Azure AD credentials (Client ID, Client Secret, Tenant ID) in Cloud → Secrets, obtains an access token from Microsoft identity, and calls Graph API endpoints for presence and communication features. New projects should use Teams, which uses the same authentication infrastructure.
Prerequisites
- A Lovable project with Lovable Cloud enabled (Cloud tab visible in the editor)
- An Azure Active Directory (Microsoft Entra ID) tenant — either your organization's or a free developer tenant from developer.microsoft.com
- Permission to create App Registrations in Azure AD (requires at least Application Developer role)
- Microsoft Graph API permissions granted by an Azure AD admin (Presence.Read, OnlineMeetings.ReadWrite)
- Understanding that Skype consumer API is deprecated — this integration targets Microsoft 365 / Skype for Business environments
Step-by-step guide
Create an Azure AD App Registration for Microsoft Graph API
Create an Azure AD App Registration for Microsoft Graph API
Navigate to portal.azure.com and sign in with your Microsoft 365 or Azure account. Go to 'Azure Active Directory' (now called Microsoft Entra ID) → 'App registrations' in the left sidebar, then click 'New registration'. Give the app a name like 'Lovable Communication Integration', select 'Accounts in this organizational directory only' for single-tenant access (or multi-tenant if building for multiple organizations), and set a redirect URI if needed for user-delegated flows. After creation, note the Application (client) ID and the Directory (tenant) ID from the Overview page — you will need both for authentication. Go to 'Certificates & secrets' → 'Client secrets' → 'New client secret'. Add a description and set an expiry period (12 months or 24 months — set a calendar reminder to rotate before expiry). Copy the Value field immediately — it is only shown once. Next, go to 'API permissions' → 'Add a permission' → 'Microsoft Graph'. Select 'Application permissions' for server-to-server calls (no user login required). Add: Presence.Read.All (to read presence), OnlineMeetings.ReadWrite.All (to create meetings), and User.Read.All (to look up users). After adding permissions, click 'Grant admin consent for {your tenant}' — this requires a Global Admin or Application Admin role in your Azure AD tenant.
Pro tip: The distinction between 'Application permissions' (server-to-server, requires admin consent) and 'Delegated permissions' (on behalf of a user, requires user sign-in) is crucial. For Edge Function integrations, use Application permissions with client credentials flow so no user needs to be logged in.
Expected result: An Azure AD App Registration with Client ID, Tenant ID, and Client Secret, plus admin-consented Graph API permissions for presence and meetings.
Store Azure AD credentials in Cloud → Secrets
Store Azure AD credentials in Cloud → Secrets
Open the Cloud tab in your Lovable editor by clicking the '+' panel icon at the top right, then select Cloud. Scroll to the Secrets section and add three secrets. Create MICROSOFT_CLIENT_ID and paste the Application (client) ID (UUID format). Create MICROSOFT_CLIENT_SECRET and paste the client secret Value (a long string shown only at creation time). Create MICROSOFT_TENANT_ID and paste the Directory (tenant) ID (UUID format). These three values together allow the Edge Function to authenticate as your Azure AD application. The Microsoft Graph API client credentials flow uses these to obtain access tokens scoped to the Microsoft Graph resource. The client secret expires on the date you set — Lovable's Secrets panel will continue to return the stored value after expiry, but Graph API calls will fail with 401 until you rotate the secret in Azure AD and update the Secrets panel. Lovable's SOC 2 Type II infrastructure encrypts all secrets at rest, and Lovable actively blocks approximately 1,200 hardcoded credentials per day.
Pro tip: Set a calendar reminder for the client secret expiry date (visible in Azure AD → App Registrations → your app → Certificates & secrets). Rotate the secret before expiry and update Cloud → Secrets to prevent integration downtime.
Expected result: MICROSOFT_CLIENT_ID, MICROSOFT_CLIENT_SECRET, and MICROSOFT_TENANT_ID secrets saved in Cloud → Secrets.
Build the Microsoft Graph API Edge Function
Build the Microsoft Graph API Edge Function
The Edge Function needs to obtain an access token from Microsoft identity using the client credentials flow, then call the appropriate Graph API endpoint. The token endpoint for client credentials is: https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token with grant_type=client_credentials, client_id, client_secret, and scope=https://graph.microsoft.com/.default. For presence checking, the endpoint is GET https://graph.microsoft.com/v1.0/users/{userId}/presence where userId is the Azure AD user ID or UPN (user@domain.com). The response includes availability (Available, Busy, Away, DoNotDisturb) and activity. For creating Teams online meetings, POST to https://graph.microsoft.com/v1.0/users/{organizerUserId}/onlineMeetings with subject, startDateTime, and endDateTime. This creates a Teams meeting owned by the specified user — the user must be licensed for Teams and the app must have OnlineMeetings.ReadWrite.All permission. The response includes joinWebUrl. Note that this creates a Teams meeting, not a Skype meeting — this is correct behavior for Microsoft's current platform. If you specifically need Skype consumer functionality, that is not available via API in 2026.
Create a Supabase Edge Function called microsoft-graph that: 1) Reads MICROSOFT_CLIENT_ID, MICROSOFT_CLIENT_SECRET, MICROSOFT_TENANT_ID from env. 2) Gets an access token from https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token using client credentials grant. 3) Supports action='presence': GET https://graph.microsoft.com/v1.0/users/{userId}/presence, returns availability and activity. 4) Supports action='create_meeting': POST to https://graph.microsoft.com/v1.0/users/{organizerUserId}/onlineMeetings with subject, startDateTime, endDateTime, returns joinWebUrl. Include CORS headers and error handling.
Paste this in Lovable chat
1// supabase/functions/microsoft-graph/index.ts2import { serve } from 'https://deno.land/std@0.168.0/http/server.ts';34const corsHeaders = {5 'Access-Control-Allow-Origin': '*',6 'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type',7};89async function getMicrosoftToken(tenantId: string, clientId: string, clientSecret: string): Promise<string> {10 const res = await fetch(11 `https://login.microsoftonline.com/${tenantId}/oauth2/v2.0/token`,12 {13 method: 'POST',14 headers: { 'Content-Type': 'application/x-www-form-urlencoded' },15 body: new URLSearchParams({16 grant_type: 'client_credentials',17 client_id: clientId,18 client_secret: clientSecret,19 scope: 'https://graph.microsoft.com/.default',20 }),21 }22 );23 if (!res.ok) throw new Error(`Microsoft auth error: ${await res.text()}`);24 const data = await res.json();25 return data.access_token;26}2728serve(async (req) => {29 if (req.method === 'OPTIONS') return new Response('ok', { headers: corsHeaders });3031 try {32 const clientId = Deno.env.get('MICROSOFT_CLIENT_ID')!;33 const clientSecret = Deno.env.get('MICROSOFT_CLIENT_SECRET')!;34 const tenantId = Deno.env.get('MICROSOFT_TENANT_ID')!;35 const { action, userId, subject, startDateTime, endDateTime } = await req.json();3637 const token = await getMicrosoftToken(tenantId, clientId, clientSecret);38 const headers = { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' };3940 if (action === 'presence') {41 const res = await fetch(`https://graph.microsoft.com/v1.0/users/${userId}/presence`, { headers });42 const data = await res.json();43 return new Response(JSON.stringify(data), { headers: { ...corsHeaders, 'Content-Type': 'application/json' } });44 }4546 if (action === 'create_meeting') {47 const res = await fetch(`https://graph.microsoft.com/v1.0/users/${userId}/onlineMeetings`, {48 method: 'POST',49 headers,50 body: JSON.stringify({ subject, startDateTime, endDateTime }),51 });52 const data = await res.json();53 if (!res.ok) throw new Error(`Meeting error: ${JSON.stringify(data)}`);54 return new Response(55 JSON.stringify({ joinWebUrl: data.joinWebUrl, meetingId: data.id }),56 { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }57 );58 }5960 throw new Error('Invalid action');61 } catch (error) {62 return new Response(63 JSON.stringify({ error: error.message }),64 { status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }65 );66 }67});Pro tip: The access token from Microsoft client credentials flow is valid for 3600 seconds (1 hour). For Edge Functions that are called frequently, consider caching the token in Supabase with its expiry timestamp to reduce authentication overhead.
Expected result: A deployed microsoft-graph Edge Function that can check user presence and create Teams online meetings via Microsoft Graph API.
Connect the Edge Function to your Lovable UI
Connect the Edge Function to your Lovable UI
Use Lovable's chat to build the frontend components that use the microsoft-graph Edge Function. For presence checking, create a user lookup component that accepts an email address or Azure AD user ID, calls the Edge Function with action='presence', and displays the availability status with an appropriate color indicator. For meeting creation, build a form that accepts meeting subject and time, calls the Edge Function with action='create_meeting' and an organizer user ID, and displays the Teams join URL. Store the joinWebUrl and meeting ID in your Supabase meetings table. Note that user IDs in Microsoft Graph can be either the Azure AD Object ID (UUID) or the user's UPN (email@domain.com). Using the UPN is more user-friendly and works well for organizational users. For the organizer user ID in meeting creation, you may want to use a dedicated 'room' or 'bot' account's Azure AD ID rather than a personal user account to keep meetings separate from individual calendars.
Build a team availability checker and meeting scheduler. Add a search field where I can type a team member's email address. When I press search, call the microsoft-graph Edge Function with action='presence' and their email as userId. Display their availability status with a colored dot. Add a 'Schedule Meeting' form below that calls action='create_meeting' with a fixed organizer user ID, subject, and time picker. Show the Teams join link on success.
Paste this in Lovable chat
Pro tip: Microsoft Graph API availability status values are: Available, AvailableIdle, Away, BeRightBack, Busy, BusyIdle, DoNotDisturb, Offline, and PresenceUnknown. Map these to friendly display names and colors in your UI.
Expected result: A UI component in Lovable showing Microsoft 365 user presence and creating Teams meeting links via Microsoft Graph API.
Common use cases
User presence and availability checking for a scheduling tool
Check whether Microsoft 365 users in your organization are available before scheduling a meeting with them. The Edge Function calls Microsoft Graph API's presence endpoint to retrieve user availability status (available, busy, away, do not disturb) and shows it in your Lovable scheduling interface.
Add availability checking to my meeting scheduler. When a user selects a team member to invite to a meeting, call my microsoft-presence Edge Function to check their current status from Microsoft Graph API. Show a colored indicator (green=available, yellow=away, red=busy) next to each team member's name in the invite list.
Copy this prompt to try it in Lovable
Microsoft Teams meeting creation (migrated from Skype)
If your organization is migrating from Skype to Teams, create a meeting scheduling feature in Lovable that generates Teams meeting links through the same Microsoft Graph API. The onlineMeetings endpoint creates Teams meetings with join URLs that users can access from any device.
Create a meeting scheduler that generates Microsoft Teams meeting links via Microsoft Graph API. Use my microsoft-meeting Edge Function to create a Teams online meeting when a booking is confirmed. Return the joinWebUrl and store it in the meetings table. Show a 'Join Teams Meeting' button to attendees.
Copy this prompt to try it in Lovable
Skype for Business contact directory lookup
For organizations still running Skype for Business Server, query the Microsoft Graph API to look up Skype for Business SIP addresses and presence information for organizational contacts. Display this in a Lovable directory or contact lookup feature.
Build a company directory that shows each employee's Skype for Business SIP address and availability status. Call my microsoft-graph Edge Function to query /users/{userId}/presence for each selected contact. Show their display name, department, SIP address, and current availability status in a card layout.
Copy this prompt to try it in Lovable
Troubleshooting
Microsoft identity returns 'AADSTS700016: Application was not found in the directory' or similar 400 error
Cause: The MICROSOFT_TENANT_ID does not match the tenant where the app registration was created, or the Client ID is from a different tenant.
Solution: Log in to portal.azure.com and verify the App Registration's Directory (tenant) ID matches MICROSOFT_TENANT_ID in your secrets exactly. Both values are UUIDs — ensure no digits are transposed. The token endpoint URL must use the same tenantId as where the app is registered.
Graph API returns 403 Forbidden with 'Insufficient privileges to complete the operation'
Cause: The application permissions (Presence.Read.All or OnlineMeetings.ReadWrite.All) were added but admin consent was not granted, or the wrong permission type was used (delegated instead of application).
Solution: Go to portal.azure.com → Azure Active Directory → App Registrations → your app → API Permissions. Verify the permissions show 'Application' type (not 'Delegated'). If the 'Status' column shows 'Not granted for tenant', click 'Grant admin consent for {tenant}' — this requires a Global Admin or Privileged Role Admin.
Client secret returns 401 after several months of working correctly
Cause: The Azure AD client secret has expired. Client secrets have a maximum lifetime of 24 months and stop working on the expiry date.
Solution: Go to portal.azure.com → App Registrations → your app → Certificates & secrets. Create a new client secret, copy the new Value, and update MICROSOFT_CLIENT_SECRET in Cloud → Secrets immediately. Delete the expired secret after confirming the new one works.
Presence API returns null or empty availability for a valid user
Cause: The user does not have a Teams license, or their presence sharing settings prevent external apps from reading their status.
Solution: Verify the user has an active Microsoft 365 license with Teams. In Microsoft Teams admin center, check that the user has presence sharing enabled. Some organizations restrict presence visibility to within the organization — ensure your app registration is in the same tenant as the users you are querying.
Best practices
- Set a calendar reminder for your Azure AD client secret expiry date and rotate it before expiry — expired secrets cause silent integration failures
- Use the user's UPN (user@domain.com) as the userId parameter rather than Object IDs where possible — UPNs are more human-readable and easier to maintain
- Request only the minimum required Graph API permissions — start with Presence.Read.All and add others only when needed
- Cache Microsoft Graph access tokens in Supabase for up to 50 minutes (tokens last 60 minutes, minus 10 minutes buffer) to reduce token acquisition overhead
- For new projects targeting Microsoft collaboration features, start with Teams integration directly rather than building for Skype — Teams is the current platform and Skype APIs are deprecated
- Use application permissions (not delegated) for server-to-server Edge Function calls — delegated permissions require a user to be signed in, which is incompatible with backend-only Edge Functions
- Monitor Graph API calls in Azure AD → App Registrations → your app → Monitoring to track usage and debug authentication failures
Alternatives
Microsoft Teams is the current Microsoft communication platform — it uses the same Azure AD authentication as Skype for Business but offers richer APIs, active development, and Lovable's native connector support.
Zoom has a purpose-built REST API for meeting creation and management without requiring enterprise directory configuration, making it simpler for non-Microsoft environments.
Google Meet generates meeting links via Calendar API and is the better choice for organizations standardized on Google Workspace rather than Microsoft 365.
Frequently asked questions
Is the Skype consumer API available for new integrations in 2026?
No — Microsoft's consumer Skype developer platform (Skype Web SDK, Skype Bot Framework for consumer Skype) was deprecated and shut down. New integrations targeting Microsoft communication services should use Microsoft Teams via Microsoft Graph API. Skype for Business Server (on-premises enterprise) still has some API access through Graph API for presence data.
Will meetings created through Microsoft Graph API appear in Teams or Skype?
Meetings created via the /onlineMeetings endpoint in Microsoft Graph API create Teams meetings, not Skype meetings. The join URL format (teams.microsoft.com/l/meetup-join/...) confirms this. This is the intended behavior — Microsoft has consolidated online meeting infrastructure on Teams.
Do I need an Azure subscription to use Microsoft Graph API?
You need an Azure Active Directory (Microsoft Entra ID) tenant, but you do not need a paid Azure subscription. Microsoft 365 business plans include Azure AD, and free developer tenants are available at developer.microsoft.com/microsoft-365/dev-program. The Azure AD app registration and Graph API calls for presence and meetings are included in Microsoft 365 licensing without additional Azure costs.
How do I handle users who don't have Microsoft 365 accounts in my Lovable app?
Microsoft Graph API presence and meeting creation are only available for users with Microsoft 365 accounts in your Azure AD tenant. For apps that serve a mix of Microsoft 365 and non-Microsoft users, consider using Microsoft Graph for M365 users and a fallback meeting provider (like Zoom or Google Meet) for others. Build the meeting creation logic to check whether a user has an Azure AD account before deciding which provider to use.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation