Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/gcsconsultores/centros-estrategicos-gcs/llms.txt

Use this file to discover all available pages before exploring further.

GCS Centros Estratégicos integrates with Microsoft 365 to store leads in SharePoint Lists and create Teams meeting events — both via the Microsoft Graph API using a service principal (app registration) with client credentials. This means the application authenticates as itself (not as a user), so no interactive login is required. Once configured, lead data captured from any sala is automatically written to your SharePoint List, and meeting requests from the Sala Ejecutiva generate real Teams calendar events with shareable join links.

Prerequisites

Before starting the Azure AD configuration, make sure you have the following in place:
  • A Microsoft 365 tenant with SharePoint and Teams enabled
  • Azure AD admin access to create App Registrations and grant admin consent
  • A SharePoint site with a list configured to receive leads (see SharePoint Setup)
  • A licensed Microsoft 365 user account to serve as the default meeting organizer

Azure AD App Registration

1

Create a new App Registration

Go to the Azure PortalAzure Active DirectoryApp RegistrationsNew Registration.
2

Configure the registration

Set a descriptive name (e.g. GCS Virtual Office). Under Supported account types, choose Accounts in this organizational directory only. Click Register.
3

Note down the IDs

On the app’s Overview page, copy the Application (client) ID and the Directory (tenant) ID — you will need both as environment variables.
4

Create a client secret

Go to Certificates & SecretsNew Client Secret. Add a description and choose an expiry period. Click Add, then copy the secret value immediately — it is only shown once.
5

Add Microsoft Graph permissions

Go to API PermissionsAdd a permissionMicrosoft GraphApplication permissions. Add the following two permissions:
  • Sites.ReadWrite.All — for writing to SharePoint Lists
  • Calendars.ReadWrite — for creating Teams meeting events
6

Grant admin consent

Back on the API Permissions page, click Grant admin consent for [your tenant] and confirm. Both permissions should show a green ✔ status.

Required Permissions

PermissionTypePurpose
Sites.ReadWrite.AllApplicationCreate and update items in SharePoint Lists
Calendars.ReadWriteApplicationCreate Teams meeting events in user calendars

Environment Variables

Add the following variables to your .env.local file. All six are required for full Microsoft 365 functionality.
AZURE_AD_CLIENT_ID=        # Application (client) ID from Azure AD
AZURE_AD_CLIENT_SECRET=    # Client secret value
AZURE_AD_TENANT_ID=        # Directory (tenant) ID
SHAREPOINT_SITE_ID=        # SharePoint site ID (see Finding IDs section below)
SHAREPOINT_LIST_ID=        # SharePoint list ID for leads
DEFAULT_ORGANIZER_EMAIL=   # Email of the consultant who organizes Teams meetings

Finding SharePoint IDs

You can retrieve your SharePoint site and list IDs using the Microsoft Graph API directly or via the Graph Explorer. Site ID — Replace {hostname} with your SharePoint domain (e.g. yourcompany.sharepoint.com) and {path} with your site path (e.g. /sites/GCSLeads):
GET https://graph.microsoft.com/v1.0/sites/{hostname}:/{path}
The response includes an id field — that is your SHAREPOINT_SITE_ID. List ID — Once you have the site ID, list all lists on that site:
GET https://graph.microsoft.com/v1.0/sites/{siteId}/lists
Each list object in the response contains an id field. Match it by the list displayName to find your SHAREPOINT_LIST_ID.
Use Microsoft Graph Explorer to run these requests interactively in your browser. Sign in with your Microsoft 365 admin account to test queries without writing any code.

Development Mode

Without the Azure AD environment variables configured, the application gracefully degrades instead of throwing errors:
  • Leads (POST /api/leads): the lead payload is logged to the server console and the response returns storage: 'local' with a note to configure environment variables.
  • Meetings (POST /api/meetings): the meeting request is logged and the response returns a mock meeting object with id: 'dev-{timestamp}' and joinUrl: null.
This means the application is fully functional for development and UI testing without any Microsoft 365 credentials.
Client secrets have a maximum expiry of 24 months in Azure AD. Set a calendar reminder before the secret expires — a lapsed secret will cause all SharePoint writes and Teams meeting creation to fail silently in development mode or return HTTP 500 in production.

SharePoint Setup

Configure your SharePoint List schema, column mapping, and test lead storage via the Graph API.

Teams Setup

Set up the organizer account, timezone, and attendee flow for automated Teams meeting creation.

Build docs developers (and LLMs) love