Avoid exposing a private agent runtime through a public inbound Teams bot endpoint. GraphHarbor uses Microsoft Graph as the already-public API boundary and keeps the agent runtime behind outbound-only calls.
- Never commit refresh tokens.
- Never commit Microsoft client secrets.
- Never print tokens in logs.
- Store token material outside the repository.
- Keep state files separate from token material.
- Redact Graph error payloads before sharing if they contain tenant, user, app, or chat details.
Use the least permission that matches the lane:
- Sending normal Teams chat messages: delegated
ChatMessage.Send. - Reading chat messages: prefer RSC or where-installed app permissions.
- Avoid broad
Chat.Read.AllorChatMessage.Read.Allfor production.
Temporary broad grants are acceptable only for bounded proof work when:
- The purpose is explicit.
- The exact grant is recorded privately.
- The grant is removed immediately after the proof.
- Removal is verified.
This project is specifically for the no-public-endpoint path.
Non-goals:
- Long-lived dev tunnel.
- Public
/api/messagesexposure. - Broad Teams message ingestion across a tenant.
- Unreviewed posting outside explicitly configured bridge contexts.
The bridge loop must:
- Deduplicate message IDs before responding.
- Avoid responding to its own messages unless explicitly configured.
- Preserve raw Graph payloads only if needed, and only in a protected local store.
- Log IDs and statuses rather than message bodies by default.
- Fail closed if token refresh fails.
- Back off on Graph throttling.
- Keep a manual kill switch.