Outlook Add-In with MFA

Purpose

This procedure specifies the steps to set up the Outlook Add-In with MFA.

Scope

This procedure applies to the NFE 2017.1.31 version and later.

Prerequisites

  • Need to have Azure account with valid subscription to create App Registration.

Procedure

Step 1. Register the add-in with Microsoft identity platform

  1. Sign into the Azure portal with the admin credentials.
  2. Select App registrations. If you don't see the icon, search for "app registration" in the search bar.Outlook Add In MFA 1.png
  3. Select New registration.                                                                                                         Outlook Add In MFA 2.png
  4. On the Register an application page, set the values as follows.
    1. Enter a display name for your application in the Name field.

    2. Set Supported account types to Accounts in any organizational directory (any Azure AD directory - multitenant) and personal Microsoft accounts (e.g., Skype, Xbox).
    3. Set Redirect URI to use the platform Single-page application (SPA) and the URI to https://<fully-qualified-domain-name>.                                                                                           Outlook Add In MFA 3.png
  5. Select Register.
  6. Copy and save the values for the Application (client) ID and the Directory (tenant) ID. You'll use both in later procedures.                                                                                           Outlook Add In MFA 4.png
  7. From the left pane, select Certificates & secrets. Then on the Client secrets tab, select New client secret.                                                                                                       Outlook Add In MFA 5.png
  8. Add a description for your client secret.
  9. Select an expiration for the secret or specify a custom lifetime.
  10. Select Add.
  11. From the left pane, select Expose an API.
  12. Select Add to generate an application ID URI.
  13. Update the Application ID URI to api://<fully-qualified-domain-name>/<app-id>.Outlook Add In MFA 6.png
  14. Click Save.
  15. On the Expose an API page, select Add a scope.                                                             Outlook Add In MFA 7.png
  16. Click Add Scope.                                                                                                          Outlook Add In MFA 8.png
  17. Select Add a client application.
  18. In the Client ID enter “xx1x00x1-b6f3-1111-b000-x666xxc3xx8x”. This value pre-authorizes all Microsoft Office application endpoints.
  19. In Authorized scopes, select the api://<fully-qualified-domain-name>/<app-id>/access_as_user checkbox.                                                  Outlook Add In MFA 9.png
  20. From the left pane, select API permissions.
  21. Select Add a permission.
  22. Select Microsoft Graph.                                                                                                           Outlook Add In MFA 10.png
  23. Select Delegated permissions.
  24. In the Select permissions search box, search for the permissions your add-in needs. For example, for an Outlook add-in, you might use profile, openid, Files.ReadWrite, Mail.Read, Files.Read.All and ConsentRequest.ReadWrite.All.                                                                                           Outlook Add In MFA 11.png
  25. Select Grant admin consent for [tenant name]. Select Yes for the confirmation that appears.

 

Step 2. Setting up NFEOutlookAAD.xml values for App Registration

  • In WebApplicationInfo sectin of NFEOutlookAAD.xml change the values in following tags.
    • Id Tag: Add the value for Application (client) ID of the app registration.
    • Resource Tag: {api://Addin URL/ClientId of App Reg}Outlook Add In MFA 12.png

 

Step 3. Setting up Config value in xWeb Web.config to validate JWT token:

  • In the appsettings section of Web.config in xWeb we need to set below 3 values for JWT token Authentication:
    • jwtWellKnownConfigUrlOutlook: “.well-known/openid-configuration
    • issuerOutlook:  “https://login.microsoftonline.com/{tenant-id}/v2.0”
    • audienceOutlook: Value for Application (client) ID of the app registrationOutlook Add In MFA 13.png
Was this article helpful?
0 out of 0 found this helpful