# Preparing Azure App Registrations permissions for Office 365 Service Health

As you may have seen in my other post, there’s a simple, PowerShell way to get Office 365 Health Service data for you to use any way you like it. But before you can use that, you need to register granular permissions on your Office 365 tenant so that that data is provided to you. Here’s a step by step way to do it.

blog

22 Apr 2019 en

![Preparing Azure App Registrations permissions for Office 365 Service Health](/wp-content/uploads/2019/03/img_5ca129a85e768.png)

[View images (14)](#pf-content-image-1-0)

As you may have **[seen in my other post](http://evotec.xyz/powershell-way-to-get-all-information-about-office-365-service-health)**, there's a simple, **PowerShell** way to get **Office 365 Health Service** data for you to use any way you like it. But before you can use that, you need to register granular permissions on your **Office 365** tenant so that that data is provided to you. Here's a step by step way to do it. Of course, this little guide can be used to get permissions for another type of data for your application from **Office 365**. Use with caution!

### 💡 Step by step – Preparing Azure App Registations

- Login to **[https://portal.azure.com**](https://portal.azure.com**)

[!\[Azure portal home page after signing in\](/wp-content/uploads/2019/03/img_5ca129a85e768.png)](/wp-content/uploads/2019/03/img_5ca129a85e768.png)

- Open **Azure Active Directory** on the left side.
- On the long list on the left side find **App registrations (Preview)**

[!\[Azure Active Directory menu with App registrations Preview selected\](/wp-content/uploads/2019/03/img_5ca129ea6743f.png)](/wp-content/uploads/2019/03/img_5ca129ea6743f.png)

- Choose **New registration** on next screen

[!\[App registrations page with the New registration action highlighted\](/wp-content/uploads/2019/03/img_5ca12a2d4f9b9.png)](/wp-content/uploads/2019/03/img_5ca12a2d4f9b9.png)

- Type in a name for your application. In my case I only wanted my claim to have limited permissions, but in case you plan to use the same App for gathering data from other places feel free to name it appropriately.

[!\[New application registration form with the application name filled in\](/wp-content/uploads/2019/03/img_5ca12acaf1327.png)](/wp-content/uploads/2019/03/img_5ca12acaf1327.png)

- Click **register** on the bottom of the page (notice it's not on the screenshot).

[!\[Azure registration screen ready to submit the new application\](/wp-content/uploads/2019/03/img_5ca12b631e30a.png)](/wp-content/uploads/2019/03/img_5ca12b631e30a.png)

- When you confirm, your application will be created, and you will be given **ApplicationID**. At this time it's also worth noting **Directory (tentant) ID**. **DirectoryID** can be used as a replacement for **Tenant Domain**. Next, you have to choose API permissions that you want to be **delegated** to that application. In my case, I pressed Add permission and got a list of all possible API's that are available for you. In this case, we need to choose **Office 365 Management APIs**.

[!\[Application overview showing the Application ID and Directory tenant ID\](/wp-content/uploads/2019/03/img_5ca12bef3d75e.png)](/wp-content/uploads/2019/03/img_5ca12bef3d75e.png)

- On the next screen, we choose **Application permissions**. After all, we want this to be running without any binding to a user.

[!\[API permissions screen with Application permissions selected\](/wp-content/uploads/2019/03/img_5ca12c173da42.png)](/wp-content/uploads/2019/03/img_5ca12c173da42.png)

- Find **ServiceHealth.Read API,** and use **Add permissions** that are available at the bottom.

[!\[Office 365 Management APIs permission list with ServiceHealth.Read available to add\](/wp-content/uploads/2019/03/img_5ca12c68e9632.png)](/wp-content/uploads/2019/03/img_5ca12c68e9632.png)

- Find **ServiceHealth.Read API,** and use **Add permissions** that are available at the bottom. Now that we have **added permissions** we need to do two things. Remove unnecessary permissions from our application and **Grant admin content for Tenant**.

[!\[API permissions overview showing the added permission and Grant admin consent action\](/wp-content/uploads/2019/03/img_5ca12d5c1e245.png)](/wp-content/uploads/2019/03/img_5ca12d5c1e245.png)

- You will be prompted to confirm your choice

[!\[Admin consent confirmation dialog for the Azure application\](/wp-content/uploads/2019/03/img_5ca12d7e95300.png)](/wp-content/uploads/2019/03/img_5ca12d7e95300.png)

- Of course, if you want your Application to do more, feel free to add more permissions as required. The best practice here is to give an app only permissions it needs and nothing more.

[!\[Final API permissions list after consent is granted and unnecessary permissions are removed\](/wp-content/uploads/2019/03/img_5ca12db318780.png)](/wp-content/uploads/2019/03/img_5ca12db318780.png)

- The last step on the list is to get **Application Key**. This can be done in **Certificate & Secrets** section on the left side.

[!\[Certificates and secrets section for creating a new client secret\](/wp-content/uploads/2019/04/img_5cbddead6e3a8.png)](/wp-content/uploads/2019/04/img_5cbddead6e3a8.png)

- Choose **New client secret, **type your key description and choose the time for how long the key will be vali

[!\[New client secret form with description and expiration options\](/wp-content/uploads/2019/04/img_5cbddec79ed24.png)](/wp-content/uploads/2019/04/img_5cbddec79ed24.png)

- Finally, copy **Application Key (Secret Key)**. If you browse away from this place, the key will no longer be available. Make sure to copy it somewhere safe.

[!\[Client secret value shown once after creation and ready to copy\](/wp-content/uploads/2019/04/img_5cbddefc5d815.png)](/wp-content/uploads/2019/04/img_5cbddefc5d815.png)

Now that you know how to generate **Application ID** and **Application Key** and **DirectoryID** feel free to find out how you can get **[Office 365 Health Service data with PowerShell](http://evotec.xyz/powershell-way-to-get-all-information-about-office-365-service-health)**.

## Related Projects

Projects that align with this post's tags, categories, and content.

[All projects](/projects/)

Matching projects...

[Back to Blog](/blog)

## Related posts

- [Office 365 Health Service using PowerShell](/blog/office-365-health-service-using-powershell/)
- [PowerShell way to get all information about Office 365 Service Health](/blog/powershell-way-to-get-all-information-about-office-365-service-health/)
- [Syncing Global Address List (GAL) to personal contacts and between Office 365 tenants with PowerShell](/blog/syncing-global-address-list-gal-to-personal-contacts-and-between-office-365-tenants-with-powershell/)

<!-- PowerForge markdown artifact sha256:82D1E5DF92F11ADF733A6B697506EBC7155389A09714A8940C7FBF7E21E80B12 -->
