Member Junction
    Preparing search index...
    GraphNotificationValidation:
        | { Kind: "validation"; ValidationToken: string }
        | { Kind: "notification" }
        | {
            Kind: "reject";
            Reason: "empty-validation-token" | "client-state-mismatch";
        }

    The result of the Graph change-notification validation-token handshake. When Microsoft Graph creates (or renews) a subscription, it first calls the notification URL with a ?validationToken=… query param and expects the endpoint to echo that exact token back as text/plain with 200. validateGraphNotification returns this discriminated result so the router can either echo the token (handshake) or proceed to process a real notification (with the clientState already verified).

    Type Declaration

    • { Kind: "validation"; ValidationToken: string }
      • Kind: "validation"

        A subscription-validation handshake — echo ValidationToken back as text/plain 200.

      • ValidationToken: string

        The exact token to echo back (Graph rejects the subscription on any mismatch).

    • { Kind: "notification" }
      • Kind: "notification"

        A real change notification whose clientState matched the expected shared secret — process it.

    • { Kind: "reject"; Reason: "empty-validation-token" | "client-state-mismatch" }
      • Kind: "reject"

        Reject — either a missing/blank token on a handshake, or a clientState mismatch on a notification.

      • Reason: "empty-validation-token" | "client-state-mismatch"

        A short machine-readable reason (for logging; never surfaced to the caller).