Need admin approval error after enabling Nested App Authentication for EWS users#

Symptoms#

The behavior varies depending on the Outlook version. Users may see the Need admin approval pop-up followed by a red error message:

Sorry, an error occurred. Please restart the Context Panel.

Additionally, an orange warning may appear:

Can’t identify your Office 365 account.

In some cases, only the red error message appears, accompanied by a correlation ID (which is not searchable).

Observed behavior#

Note

In New Outlook, the Need admin approval pop-up does not appear. Instead, Context Panel is immediately blocked.

Additionally, in Outlook on the web, the browser may block the pop-up by default. Users must select Always allow for it to appear.

../../../../_images/PopUpsBlockedNotification.png

Causes#

Due to Microsoft’s deprecation of legacy tokens, migrating to Nested App Authentication is required to keep add-ins up and running. The Revenue Grid application lacks the necessary permissions after enabling Nested App Authentication.

While users with Microsoft Graph access have either granted consent or had permissions assigned by an admin, users with an Exchange Web Services (EWS) connection do not have these permissions. As a result, they encounter the Need admin approval pop-up, and Context Panel remains blocked until permissions are granted.

Additionally, this error indicates that Do not allow user consent is enabled in the User consent settings of the corporate Microsoft Entra admin center.

To check this setting, navigate to: Applications > Enterprise applications > Consent and permissions.

../../../../_images/ConsentAndPermissions.png

Resolution#

There are multiple ways to make sure the necessary permissions are granted depending on the Microsoft Entra settings.

If a Microsoft 365 admin has Context Panel installed#

The admin can register consent during login by following these steps:

  1. Log in to Outlook on the web: Outlook

  2. Open Context Panel and wait for the Microsoft 365 OAuth dialog to appear.

  3. In the Permissions requested dialog, select Consent on behalf of your organization and click Accept.

    ../../../../_images/ConsentOnBehalfOfYourOrganization.png

If authorization is successful, a Signed in successfully notification appears.

Once consent is granted, it applies to the entire organization, and no further actions are required from end users.

If a Microsoft 365 admin does not have Context Panel installed#