Microsoft Entra app for calendar sync
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
slotmirror needs an app registration in Microsoft Entra to connect Microsoft 365 and Outlook.com accounts.
Check first: can I approve the app myself?
Section titled “Check first: can I approve the app myself?”A work or school tenant decides whether its users may approve apps. If it does not, the first sign-in stops with a consent error, and an administrator of that tenant has to approve the app. Check this before you ask people to connect their calendars:
- Sign in to the Microsoft Entra admin center of the tenant whose calendars you connect.
- Open Enterprise applications, then Consent and permissions, then User consent settings.
- If users may not consent to apps, or only to apps from verified publishers, an administrator has to approve slotmirror for the tenant. This is possible after you create the app below. The app then shows a request that you can copy. See Troubleshooting.
A personal Microsoft account approves for itself.
Create the app registration
Section titled “Create the app registration”- In the Microsoft Entra admin center, open App registrations and choose New registration.
- Supported account types: Accounts in any organizational directory and personal Microsoft accounts. Choose a single tenant only if every calendar is in your tenant.
- Redirect URI: platform Web,
https://<your-worker>/auth/microsoft/callback. The approval link for administrators returns to the same address, so it needs no second redirect URI. - Under API permissions, add the delegated Microsoft Graph permissions
openid,email,profile,offline_access,User.ReadandCalendars.ReadWrite. Users can consent to these themselves, unless your tenant blocks user consent (see the check above). - Optional: under Token configuration, add the optional claims
emailandxms_edovto the ID token. slotmirror then signs in a user under their email address if their tenant verified its domain. Without them, new users sign in under their user principal name; existing users keep their address. - Under Certificates & secrets, create a client secret. Entra shows its expiry date. Choose
the longest lifetime the portal offers, and put the expiry date in your calendar a few weeks
ahead. When the secret expires, token refreshes fail and the sync stops. Before that date,
create a new secret and replace
MICROSOFT_CLIENT_SECRETwith its value. Copy the value when you create it: Entra shows it only once. - Set
MICROSOFT_CLIENT_ID(the application ID) andMICROSOFT_CLIENT_SECRETas secrets. In the Cloudflare dashboard, open your Worker, Settings, Variables and Secrets. With a clone, you can runpnpm wrangler secret put <NAME>instead.
Set ALLOWED_TENANT_IDS to restrict Microsoft sign-in to your tenants. For a team on Microsoft
365, also see Organisations: it explains ALLOWED_TENANT_IDS and
SIGN_IN_PROVIDERS.