Office 365 Configuration

Overview

Integration of Microsoft Office 365 with the Binadox SaaS and IaaS usage monitoring and cost optimization platform allows you to get Office 365 spend and utilization insights and usage analysis of Office 365 features on a per-user basis, as well as to receive cost optimization recommendations. Additionally, if you have a single sign-on (SSO) method enabled, Binadox will discover applications used by employees in your enterprise that are authenticated to via SSO. The system will notify you of discovered applications available for integration with Binadox to receive their usage and spend data.

Note:
For Application Discovery with Office 365, you require Azure Active Directory Premium P1 or P2 licenses.

This guide provides step-by-step instructions on how to integrate Microsoft Office 365 with Binadox. To successfully connect Binadox with your Office 365 account, the following parameters are required: a Tenant domain, an Application ID and a Client Secret of an application registered with Azure Active Directory, and login credentials. For safety reasons, create a new user and assign him a restricted role with limited access to your Microsoft tenant. There are two options to generate the required parameters:

Option 1. Use Windows PowerShell. Download and unzip the script file. Run it using the PowerShell commands. PowerShell will automatically generate all the required parameters (see Clause 1 for step-by-step instructions).

Download Script File

Option 2. On the Microsoft Azure portal, register the Binadox application. In the Microsoft 365 admin center, create a new user to represent Binadox and assign him a restricted role with limited access to your Microsoft tenant (see Clause 2 for step-by-step instructions).

Note:
Cost optimization and usage monitoring are available only for paid Office 365 subscriptions.

Option 1. PowerShell

1.1 Change a PowerShell Execution Policy

1. Download the file. Extract the .ps1 file from the zipped file.

2. On your Windows computer, type “PowerShell” in the search box next to the Start Menu. Right-click the app name and select the Run as Administrator option in the drop-down list.

fig.1-Admin-PowerShell

3. Right-click the downloaded .ps1 file and select Properties in the drop-down list. On the General tab, copy the file location.

fig.2-File-Properties-PowerShell

4. Change the default directory to the one of the downloaded .ps1 file by entering the cd command and specifying the file location, e.g. cd C:Users/Admin/Desktop. Press Enter.

fig.3-File-Location-PowerShell

5. The default execution policy for Windows client computers is Restricted. To see the effective execution policy for the current session, use the Get-ExecutionPolicy cmdlet. To allow running unsigned script files, change the Restricted execution policy into Unrestricted. Use the Set-ExecutionPolicy Unrestricted cmdlet. Choose the Yes option by typing Y. Press Enter.

fig.4-Unrestricted-Execution-Policy-PowerShell

1.2 Run the Script

Make sure to extract the .ps1 file from the zipped file. Type ./Bin_v0.3.ps1 (the name of the downloaded file with the ./ prefix, with or without the .ps1 extension). Press Enter.

To allow PowerShell to run the script, choose the Run once option by typing R. Press Enter.

fig.5-Run-Once-PowerShell

1.3 Install the NuGet Provider

In case the NuGet Provider has not been installed on your Windows computer, the prompt message will require you to do so. To allow the PowerShellGet module to install and import the NuGet provider, choose the Yes option by typing Y. Press Enter.

fig.6-NuGet-Provider-PowerShell

1.4 Copy Generated Parameters

1. Global administrator permissions are required to continue. In the appeared PowerShell credential request window, type in Office 365 global administrator credentials. Click Ok.

fig.7-Global-Admin-Rights-PowerShell

2. Copy generated configuration parameters: Tenant domain, Application ID, Client Secret and credentials of a new user with limited access to your Microsoft tenant.

fig.8-Configuration-Parameters-PowerShell

1.5 Return the Default Execution Policy

Press any key to continue. To return the default Restricted execution policy, use the Set-ExecutionPolicy Restricted cmdlet. Choose the Yes option by typing Y. Press Enter.

fig.9-Restricted-Execution-Policy-PowerShell

See Clause 3 on how to connect Office 365 with Binadox.

Option 2. Azure AD and Microsoft 365 Admin Center

2.1 Register Binadox with Azure AD

To register Binadox with Azure Active Directory, you need a subscription to Office 365 and a subscription to Azure associated with the Office 365 subscription.

1. Sign in to the Microsoft Azure portal as a global administrator using credentials of your Microsoft tenant that has the subscription to Office 365 you wish to use for Binadox spend and usage optimization.

2. In the navigation pane on the left, click All services > Identity > Azure Active Directory. Use the search bar, if necessary.

Advice: For your convenience, click on the star icon near the Azure Active Directory service name to add it to the Favorites category in the navigation pane.

fig.1-AD-Office365

3. Go to the App registrations section and click the New registration button.

fig.2-App-Registrations-Office365

4. Fill in the following fields in the registration form:
• Enter an application name in the Name field (e.g. Binadox).
• Check the Accounts in the organizational directory only checkbox in the Supported account types field.
• In the Redirect URI (optional) section, select Web in the drop-down list. Enter the following URL:

https://app.binadox.com/api/1/applications/authorize/try

Click the Register button to complete the registration.

fig.3-Binadox-Registration-Office365

5. On the App registrations page, click on the name of a newly registered application.

fig.4-Display-Name-Office365

6. In the navigation pane, choose API permissions. Under API/Permissions name, click Microsoft Graph. On the Request API permissions page that opens, choose Delegated permissions, scroll down the permissions list and choose AuditLog. Select the AuditLog.Read.All checkbox. Then scroll down, choose Directory and select the Directory.Read.All checkbox. Choose User and select User.Read. Click Update permissions.

fig.5-Permissions-Office365

7. Under the API/Permissions name, check you configured all the required API permissions:
AuditLog.Read.All
Directory.Read.All
User.Read

fig.6-Permissions-Granted-Office365


2.2 Add a New Office 365 User with Security Reader Permissions

For safety reasons, you may create a new user in the Microsoft 365 admin center and assign him a restricted role with limited access to your Microsoft tenant.

1. Sign in to the Microsoft 365 admin center as a global administrator.

2. In the navigation pane on the left, navigate to Users > Active users. Click on the Add a user button.

fig.1-Active-Users-Office365

3. Fill in all the required fields in the Add user form.

– Enter a display name and a username.
– Choose the required Password settings.
– Leave Require this user to change their password when they first sign in unchecked (so you do not have to log in to the Azure portal as a new user and create a new password to activate the account).

Click Next.


fig.2-Basics-Add-User-Office365

4. In the Product licenses view, select the location. Select the Create user without product license option. Click Next.

fig.3-Product-Licenses-Add-User-Office365

5. In the Optional settings view, click Roles. Select Admin center access. Click Show all by category.

fig.4.1-Admin-Center-Access-Office365

6. Scroll down to the Other category. Select the Billing admin checkbox. Click Next.

fig.4.2-Billing-Admin-Role-Office365

7.Review data and click Finish adding to add a new user.

fig.5-Finish-Adding-Office365

8. Copy a username and a password. Click Close.

fig.6-User-Details-Office365

9. To specify the permission levels of the new user, click …Show all in the navigation pane on the left to open up the Admin centers section. Go to Security & Compliance.

fig.7-Security-Compliance-Office365

10. You will be redirected to the Office 365 Security & Compliance dashboard. In the navigation pane on the left, click Permissions. Select the Security Reader check-box in the list of role group names. In the Security Reader view that opens on the right, go to Members and click Edit.

fig.8-Permissions-Office365

11. In the Editing Choose members view, click Choose members.

fig.9-Choose-Members-Office365

12. In the Choose members view, click the + Add button to add the new user to the Security Reader role group.

fig.10-Add-User-Office365

13. Select the new user from the Members list. Use the search box, if necessary. Click Add.

fig.11-Choose-Members-Office365

14. Click Done to add the user to the Security Reader role group.

fig.12-Security-Reader-User-Office365

15. Click Save to finish.

fig.13-Save-User-Permissions-Office36



2.3 Disable Multi-Factor Authentication

Multi-Factor Authentication enabled for the user may disrupt the connection with Binadox. To disable it, do the following:

1. Log into the Microsoft Azure portal as a global administrator. In the navigation pane on the left, go to Azure Active Directory > Users.

fig.1-AD-Users-Office365

2. Click All users in the navigation pane. In the All Users view, click Multi-Factor Authentication on the toolbar.

fig.2-MFA-AD-Office365

3. You will be redirected to the Multi-Factor Authentication view. Put the tick mark next to the name of the required user. In the appeared menu to the right, click the Disable option in the Quick Steps section. Click Yes in the appeared window to confirm the action.

fig.3-Disable-MFA-AD-Office365



2.4 Locate Integration Data on the Azure Portal

1. To find the Tenant domain, Application ID and Client Secret, sign in to the Microsoft Azure portal as a global administrator. Navigate to Azure Active Directory.

2. To locate the Tenant domain, click Custom domain names. Copy your tenant domain from the Name field (e.g. organization.onmicrosoft.com). You may also hover the mouse pointer over the profile information at the top right corner of the menu bar to see the tenant domain.

fig.1-Tenant-Domain-Office365

3. To locate an Application (client) ID, click Azure Active Directory > App registrations in the navigation pane on the left. Click on the name of the Binadox application. To quickly locate it, type in its name in the search bar.

fig.2-App-ID-Office365

4. To copy an Application (client) ID, hover the mouse pointer over the value. Click on the appeared icon to copy it to the clipboard.

fig.3-App-ID-Location-Office365

5. To generate a new Client Secret, go to the Certificates and secrets section and click the New client secret button.

fig.4-App-Secret-Office365

6. Make a Description for your client secret, select its duration in the Expires section and click the Add button.

fig.5-Add-New-Secret-Office365

7. Hover the mouse pointer over the value and click on the appeared icon to copy it to the clipboard.

fig.6-Copy-App-Secret-Office365



3. Create New Connection for Office 365 in Binadox

1. Log into your Binadox account.

2. In the navigation pane on the left, click Integrations. Proceed to the SaaS tab. Click on the Office 365 icon. To quickly locate Office 365 in the list of available applications, type in its name in the search bar or use an alphabetical filter by clicking on the first letter of an application name, i.e. O.

fig.1-Integrations-Office365

3. In the Office 365 view, type in the name of an instance in the Connection Instance Name field. Click Continue.

fig.2-Connection-Instance-Name-Office365

4. Fill in the required fields with parameters genereated automatically in PowerShell (see Clause 1 for step-by-step instructions) or manually on the Microsoft Azure portal and in the Microsoft 365 Admin Center (see Clause 2 for step-by-step instructions). Click Connect.

fig.3-Connection-Properties-Office365

5. You will be redirected to the Microsoft login page.

IMPORTANT:
Admin permissions are required to grant Binadox access to read usage and cost data in the account. For this purpose, log in with administrator credentials.


fig.4-Sign-In-Office365

6. In the appeared Permissions requested window, click Accept to give Binadox permissions to analyze data for spend and usage optimization.

fig.5-Permissions-Office365

7. Office 365 connection with Binadox is established.

fig.6-Status-Connected-Office365