Connect

Admin-consent link for a Microsoft tenant

Changed on

Returns the Microsoft Entra admin-consent link for the app, so a tenant administrator can grant mail or calendar access.

Some Microsoft 365 tenants let no user grant mail or calendar access themselves. The API then answers 412 admin_consent_required with details.adminConsentUrl, a ready admin-consent link.

This endpoint mints a fresh one (each is valid for one hour) and lets you choose redirectUrl.

Flow

  1. A tenant administrator opens the link and approves.
  2. They are sent to redirectUrl with adminConsent=granted&tenant=… (or adminConsent=denied&error=…).
  3. The grant is recorded on the account, and later requests succeed without a reconnect.
get/v1/connect/microsoft/admin-consent

Request

  • Base URL
    https://zernio.com/api
  • URL
    https://zernio.com/api/v1/connect/microsoft/admin-consent
  • Auth
    HTTP bearer

Query parameters

accountIdstring required
redirectUrlstring uri

Where to send the administrator afterwards.

Response

The link to hand to a tenant administrator

Changes