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
- Sign into the Azure portal with the admin credentials.
- Select App registrations. If you don't see the icon, search for "app registration" in the search bar.
- Select New registration.
- On the Register an application page, set the values as follows.
-
Enter a display name for your application in the Name field.
- Set Supported account types to Accounts in any organizational directory (any Azure AD directory - multitenant) and personal Microsoft accounts (e.g., Skype, Xbox).
- Set Redirect URI to use the platform Single-page application (SPA) and the URI to https://<fully-qualified-domain-name>.
-
- Select Register.
- Copy and save the values for the Application (client) ID and the Directory (tenant) ID. You'll use both in later procedures.
- From the left pane, select Certificates & secrets. Then on the Client secrets tab, select New client secret.
- Add a description for your client secret.
- Select an expiration for the secret or specify a custom lifetime.
- Select Add.
- From the left pane, select Expose an API.
- Select Add to generate an application ID URI.
- Update the Application ID URI to api://<fully-qualified-domain-name>/<app-id>.
- Click Save.
- On the Expose an API page, select Add a scope.
- Click Add Scope.
- Select Add a client application.
- In the Client ID enter “xx1x00x1-b6f3-1111-b000-x666xxc3xx8x”. This value pre-authorizes all Microsoft Office application endpoints.
- In Authorized scopes, select the api://<fully-qualified-domain-name>/<app-id>/access_as_user checkbox.
- From the left pane, select API permissions.
- Select Add a permission.
- Select Microsoft Graph.
- Select Delegated permissions.
- 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.
- 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}
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 registration