Free 30 Day Trial
Find the root-cause of your cloud, hybrid-cloudor on-prem performance issues
Registering the Microsoft Graph App On Microsoft Azure Active Directory
To achieve this, follow the steps detailed below:
Login to the Office 365 portal as a Global Administrator and to the Admin center.
Figure 3 then appears, using which you can register the Microsoft Graph app. In the Name text box, specify the display name of the app you intend to register. Make sure you copy this name to notepad. Then, from the drop-down in the Redirect URI section, select Web. In the text box adjacent to the drop-down, specify the URL to which the authentication response needs to be returned after successfully authenticating users to the new app. Make sure that this URI is in the format: https://<initial/default domain>-my.sharepoint.com. For example, the URI can be https://egitest-my.sharepoint.com. Finally, click the Register button in Figure 3 to register Microsoft Graph on Azure AD.
Upon successful app registration, Figure 4 will appear displaying a message to that effect. Additionally, Figure 4 will display the Application (client) ID that is auto-generated and auto-assigned to the Microsoft Graph app. Make sure you copy this ID also to notepad.
Next, proceed to create a secret for the new app. To achieve this, click on the Certificates & Secrets option under Manage in the left panel of Figure 4. Figure 5 will then appear. Now, click on the New client secret link in the Client Secrets section in the right panel of Figure 5.
When Figure 6 appears, provide a Description for the new secret, set it to Never expire, and click the Add button to add the new secret.
Once the new secret is successfully created, a key Value will be generated for it as depicted by Figure 7. Make a note of this key in notepad.
Next, proceed to grant permissions to the Microsoft Graph app, so it can pull the desired metrics. For this, click on the API permissions option under Manage in the left panel of Figure 7. This will invoke Figure 8. In the right panel of Figure 8, click on the Add a permission link.
Then, click on Microsoft Graph in the Request API Permissions window that appears (see Figure 9).
Expand the ServiceHealth node and select the ServiceHealth.Read.All option;
Expand the ServiceMessage node and pick the ServiceMessage.Read.All option;
Expand the Reports node, and select the Reports.Read.All option;
This will allow the Microsoft Graph app to read the service health information, user profiles, and usage reports of your organization. Finally, click on Add permissions in Figure 11 to add the chosen permission.
When Figure 12 appears, click on Grant admin consent for ... to grant admin consent to the permissions requested.
Now, click on the Add a permission link in Figure 12.
From Figure 13 that then appears, select the Yammer option.
This will invoke Figure 14. Here, select the Delegated Permissions option, and then click the check box alongside user_impersonation in the Select Permissions section (see Figure 14). Then, click the Add permission button in Figure 14.
Next, proceed to create a .dat file to which the details of the Microsoft Graph app - i.e., the app name, its client ID, and client secret - will be written. At run time, the eG agent reads the .dat file to know which app should be used for pulling metrics from Office 365. To create the .dat file, first, login to the eG agent host, Then, using Powershell ISE, execute the O365_CreateGraphDat.ps1 command from the <EG_INSTALL_DIR>\lib\O365 directory. Upon successful command execution, the dialog box depicted by will appear.
If the .dat file is created successfully, a message to that effect will appear. You will find this .dat file in the <EG_AGENT_INSTALL_DIR>\agent\O365\MSGraph folder in the eG agent host.
In environments where hundreds of users connect to Office 365, it is common-place to configure multiple agents to monitor a single Office 365 tenant for the purpose of load-balancing. In such environments, you do not have to run the O365_CreateGraphDat.ps1 script on each agent and create a separate .dat file on every agent host. Instead, after registering the MS Graph App, run the O365_CreateGraphDat.ps1 script on any one agent, and have the .dat file (containing the app name, client ID, client secret) automatically created on that agent. You can then copy the MSGraph folder (containing the .dat file) so created to the <EG_AGENT_INSTALL_DIR>\agent\O365\ directory of every other agent that has been configured to monitor the target Office 365 tenant. If this folder is not copied to the other eG agents as well, then none of these agents will be able to report those metrics for which the MS Graph App is required..