Connect one private agenda to Microsoft
The teacher-work worker polls Microsoft Graph with a delegated grant. The owner sees private Tasks and calendar events through the teacher portal’s Agenda. Only the configured To Do list and dedicated Outlook user calendar participate. A selected list can already contain YXNU tasks. The first sync reads their current dates and reminders from Microsoft.
Connect the pilot
Section titled “Connect the pilot”- Apply the additive database and sync-registry migrations through the usual migration workflow. Roll out the updated Circuits table list before clients subscribe to the new registry. Keep the API, worker and portal on matching registry versions.
- Register a Microsoft Entra public client application for the account type you use, enable public client flows and permit delegated
User.Read,Tasks.ReadWrite,Calendars.ReadWrite, andoffline_access. Microsoft consent covers the account. The worker reads and writes the selected list and calendar. Create a dedicated writable calendar in your own Outlook account. - In your own terminal, configure
PERSONAL_AGENDA_CLIENT_ID(app registration ID) andPERSONAL_AGENDA_TENANT(your tenant ID orconsumersfor a personal account). Runmise exec -- bun run agenda:microsoft discover. After interactive Microsoft sign-in the command prints the account, list and calendar IDs and names. Choose the existing teaching list and the dedicated calendar. - Provide the settings below to the setup command and the worker. The setup command also needs an operator
DATABASE_URL. Runmise exec -- bun run agenda:microsoft connectand sign in. This verifies the account, selected list, and writable non-default calendar before storing a refresh grant encrypted in PostgreSQL. Repeating the command for the same selection renews consent. The grant is bound to the Emergent owner, Microsoft account, app and selection. Keep the encryption key in the same protected secret store as the rest of the deployment’s keys. - Configure the portal build (or your own Vite dev session) with
VITE_PERSONAL_AGENDA_PERSON_IDset to the same Emergent Person ID. SetPERSONAL_AGENDA_ENABLED=trueon the worker once ready to synchronize. The API needs the pilot Person ID to authorize private agenda writes.
| Worker setting | Value |
|---|---|
PERSONAL_AGENDA_PERSON_ID |
The teacher’s Emergent Person UUID |
PERSONAL_AGENDA_MICROSOFT_USER_ID |
Microsoft user ID from discovery |
PERSONAL_AGENDA_CLIENT_ID, PERSONAL_AGENDA_TENANT |
Same application and tenant as discovery |
PERSONAL_AGENDA_LIST_ID, PERSONAL_AGENDA_CALENDAR_ID |
Exact opaque IDs from discovery |
PERSONAL_AGENDA_TIMEZONE |
Teacher’s IANA timezone, e.g. Asia/Shanghai |
PERSONAL_AGENDA_KEY |
A dedicated random 32-byte key, standard base64 encoded |
PERSONAL_AGENDA_ENABLED |
true enables background sync |
The Helm chart reads these keys from the optional emergent-personal-agenda Secret. The API receives only the Person ID. The worker receives the pilot configuration. Supply confidential values through your existing encrypted configuration mechanism. Never set the Microsoft grant or encryption key in a VITE_ variable. Updating an environment-backed Secret takes effect on the operator’s next rollout.
Check the first sync
Section titled “Check the first sync”Open Agenda and compare one existing Microsoft Task’s title, date and selected reminder. Create a disposable private Task in the connected list and let the worker make the counterpart. Move its reminder from your phone, verify the new time in Emergent, close both Emergent clients, and check for actual device delivery. Complete the Task in To Do and confirm completion in Emergent. Use an explicitly disposable Task to verify deletion in both places.
Create a private preparation block in the dedicated calendar. Move it in Outlook and verify the time in Emergent. For an official teaching Meeting, confirm that the projected time matches the timetable. Its Outlook copy follows the official Meeting after an external drag. A deadline alone consumes no Outlook calendar time.
The worker scans the two selected containers roughly once a minute by default. Its health response includes the latest sync counts and a count of unsuccessful passes. The initial window for new Meeting projections runs from 30 days back to 180 days ahead and uses active Offerings you personally teach. Invitations and recurring items stay under Microsoft management. The pilot understands IANA timezones and Microsoft’s China Standard Time. Unsupported items contribute to the health report’s unsupported count.
If task creation times out after submission, the next scan looks for the counterpart using its Emergent link. If it remains unconfirmed, check the list in Microsoft To Do before creating a replacement. Emergent retains the original Task and shows the failure in Agenda. Additional private reminders are available to native clients through Emergent sync.
See the private agenda decision and Microsoft device authorization flow.