๐จ Never Miss a SharePoint Outage Again: Build Your Own Real-Time Alert System with Power Automate Get instant Teams notifications when SharePoint Online has issues — before your users start complaining! ๐ January 2026 • ⏱️ 20 min read • ๐ก Intermediate Level
๐จ Never Miss a SharePoint Outage Again: Build Your Own Real-Time Alert System with Power Automate
Get instant Teams notifications when SharePoint Online has issues — before your users start complaining!
The Problem: SharePoint goes down. Users flood your inbox with "Is SharePoint broken?" emails. You scramble to check the admin center. Sound familiar? In this guide, you'll build an automated monitoring system that alerts your IT team the moment Microsoft detects a SharePoint issue — often before users even notice!
๐ What's in This Guide
๐ฏ What You'll Build
By the end of this guide, you'll have a Power Automate flow that:
- ✅ Checks Microsoft 365 Service Health every 15 minutes
- ✅ Filters for SharePoint Online issues only
- ✅ Ignores old/resolved issues — only alerts on active problems
- ✅ Sends detailed alerts to your Teams channel
๐ฑ Sample Alert Message
๐ Prerequisites
๐ Part 1: Azure AD App Registration
First, we need to create an Azure AD app that has permission to read Microsoft 365 Service Health data. This app will authenticate our Power Automate flow with Microsoft Graph API.
1Create the App Registration
Navigate to Azure AD
- Go to portal.azure.com
- Search for "App registrations" in the search bar
- Click "App registrations"
Create New Registration
- Click "+ New registration"
- Fill in the details:
| Name | SharePoint Health Monitor |
|---|---|
| Supported account types | Select: "Accounts in this organizational directory only" |
| Redirect URI | Leave blank |
- Click "Register"
✅ Save These Values!
After registration, you'll see the Overview page. Copy and save:
- Application (client) ID — e.g.,
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - Directory (tenant) ID — e.g.,
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
2Configure API Permissions
Now we need to grant the app permission to read Service Health data from Microsoft Graph.
Add Permissions
- In your app, click "API permissions" in the left menu
- Click "+ Add a permission"
- Select "Microsoft Graph"
- Select "Application permissions" (not Delegated!)
- Search for and check these permissions:
| Permission | Description |
|---|---|
ServiceHealth.Read.All | Read service health information |
ServiceMessage.Read.All | Read service messages and announcements |
- Click "Add permissions"
Grant Admin Consent
- Back on the API permissions page, click "Grant admin consent for [Your Organization]"
- Click "Yes" to confirm
- You should see green checkmarks ✅ next to both permissions
⚠️ Admin Consent Required
You must be a Global Administrator to grant admin consent. If you don't see the button, contact your Azure AD admin.
3Create Client Secret
The client secret is like a password that Power Automate will use to authenticate.
Generate Secret
- Click "Certificates & secrets" in the left menu
- Click "+ New client secret"
- Fill in:
| Description | Power Automate Service Health |
|---|---|
| Expires | Select: 24 months (or your preference) |
- Click "Add"
๐ด CRITICAL: Copy the Secret Value NOW!
The secret Value is only shown ONCE! Copy it immediately and store it securely.
You need the Value (not the Secret ID).
Example: Abc8Q~x-X_XXxxxxXXXXxxxxxXXXXXX1X1x1X
4Your Credentials Summary
You should now have these three values. Keep them safe!
| Credential | Where to Find It | Example Format |
|---|---|---|
| Tenant ID | App Overview page → Directory (tenant) ID | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| Client ID | App Overview page → Application (client) ID | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| Client Secret | Certificates & secrets → Value column | Abc8Q~x-X_XXxxxx... |
๐ก Pro Tip: Use Azure Key Vault
For production environments, consider storing your client secret in Azure Key Vault and referencing it from Power Automate for better security.
⚡ Part 2: Build the Power Automate Flow
Now let's build the flow that monitors SharePoint health and sends Teams alerts!
๐ Flow Architecture Overview
┌─────────────────────────────────────────────────────────────────┐
│ FLOW STRUCTURE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ⏰ Recurrence (Every 15 minutes) │
│ ↓ │
│ ๐ HTTP POST: Get Access Token │
│ ↓ │
│ ๐ Parse JSON: Extract Token │
│ ↓ │
│ ๐ง Compose: Build "Bearer [token]" Header │
│ ↓ │
│ ๐ HTTP GET: Call Microsoft Graph Service Health API │
│ ↓ │
│ ๐ Parse JSON: Extract Services & Issues │
│ ↓ │
│ ๐ Initialize Variables: SharePointIssueFound, IssueDetails │
│ ↓ │
│ ๐ Filter Array: SharePoint Online Only │
│ ↓ │
│ ๐ Loop Services │
│ └─→ Condition: Status ≠ serviceOperational? │
│ └─→ Yes: Set SharePointIssueFound = true │
│ └─→ ๐ Loop Issues │
│ └─→ Condition: Status ≠ serviceRestored? │
│ └─→ Yes: Append issue details │
│ ↓ │
│ ❓ Condition: SharePointIssueFound = true AND IssueDetails ≠ ""│
│ └─→ Yes: ๐ฌ Post Teams Message │
│ │
└─────────────────────────────────────────────────────────────────┘
1Create the Flow Trigger
Create Scheduled Flow
- Go to make.powerautomate.com
- Click "+ Create" → "Scheduled cloud flow"
- Configure:
| Flow name | SharePoint Health Monitor |
|---|---|
| Run this flow | Every 15 Minutes |
- Click "Create"
2Get Access Token (HTTP POST)
Add HTTP Action
- Click "+ New step"
- Search for "HTTP" and select it
- Configure the action:
| Method | POST |
|---|---|
| URI | https://login.microsoftonline.com/[YOUR-TENANT-ID]/oauth2/v2.0/token Replace |
| Headers | Key: Content-TypeValue: application/x-www-form-urlencoded |
| Body | grant_type=client_credentials&client_id=[YOUR-CLIENT-ID]&client_secret=[YOUR-CLIENT-SECRET]&scope=https://graph.microsoft.com/.default Replace the placeholders with your values from Part 1 |
- Click "..." → "Rename" → Enter:
Get Access Token
3Parse Token Response
Add Parse JSON Action
- Click "+ New step"
- Search for "Parse JSON" and select it
- Configure:
| Content | Click ⚡ Dynamic content → Select Body from "Get Access Token" |
|---|---|
| Schema | { "type": "object", "properties": { "token_type": {"type": "string"}, "expires_in": {"type": "integer"}, "access_token": {"type": "string"} } } |
- Rename to:
Parse Token Response
4Build Authorization Header (Compose)
๐ก Why Use Compose?
We use a Compose action to build the "Bearer [token]" string because directly combining text with dynamic content in HTTP headers can be unreliable. This method is more robust.
Add Compose Action
- Click "+ New step"
- Search for "Compose" and select it
- In the Inputs field:
- Click Expression tab
- Enter this expression:
- Click OK
- Rename to:
Build Auth Header
5Get Service Health (HTTP GET)
Add HTTP Action
| Method | GET |
|---|---|
| URI | https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/healthOverviews?$expand=issues |
| Headers | Key: AuthorizationValue: Click ⚡ Dynamic content → Select Outputs from "Build Auth Header" |
Rename to: Get Service Health
6Parse Service Health Response
Add Parse JSON Action
| Content | ⚡ Dynamic content → Body from "Get Service Health" |
|---|---|
| Schema | { "type": "object", "properties": { "value": { "type": "array", "items": { "type": "object", "properties": { "id": {"type": "string"}, "service": {"type": "string"}, "status": {"type": "string"}, "issues": { "type": "array", "items": { "type": "object", "properties": { "id": {"type": "string"}, "title": {"type": "string"}, "status": {"type": "string"}, "impactDescription": {"type": "string"}, "startDateTime": {"type": "string"} } } } } } } } } |
Rename to: Parse Service Health
7Initialize Variables
Variable 1: SharePointIssueFound
| Name | SharePointIssueFound |
|---|---|
| Type | Boolean |
| Value | false |
Variable 2: IssueDetails
| Name | IssueDetails |
|---|---|
| Type | String |
| Value | (Leave empty) |
8Filter for SharePoint Only
Add Filter Array Action
| From | Click Expression tab, enter: body('Parse_Service_Health')?['value'] |
|---|---|
| Filter Condition | Click "Edit in advanced mode", enter: @equals(item()?['service'], 'SharePoint Online') |
9Process Issues with Loops and Conditions
This is where the magic happens! We loop through SharePoint services, check for issues, and filter out old resolved problems.
Step 9.1: Add "Apply to each" for Services
| Select output | Expression: body('Filter_array') |
|---|
Rename to: Loop Services
Step 9.2: Inside Loop - Add Condition (Service Status)
| Left Value | Expression: items('Loop_Services')?['status'] |
|---|---|
| Operator | is not equal to |
| Right Value | serviceOperational |
Step 9.3: In "If yes" - Set Variable
Set SharePointIssueFound = true
Step 9.4: In "If yes" - Add Nested "Apply to each" for Issues
| Select output | Expression: items('Loop_Services')?['issues'] |
|---|
Rename to: Loop Issues
๐ฏ THE KEY STEP: Filter Active Issues Only!
This condition prevents old "serviceRestored" issues from appearing in your alerts.
Step 9.5: Inside "Loop Issues" - Add Condition (Issue Status)
| Left Value | Expression: items('Loop_Issues')?['status'] |
|---|---|
| Operator | is not equal to |
| Right Value | serviceRestored |
Step 9.6: In "If yes" - Append to String Variable
| Name | IssueDetails |
|---|---|
| Value | Expression: concat( '๐ Issue ID: ', items('Loop_Issues')?['id'], ' ', '๐ Title: ', items('Loop_Issues')?['title'], ' ', '๐ด Status: ', items('Loop_Issues')?['status'], ' ', '๐ฅ User Impact: ', items('Loop_Issues')?['impactDescription'], ' ', '๐ Start Time: ', items('Loop_Issues')?['startDateTime'], ' ', '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ' ) |
10Send Teams Alert
Step 10.1: Add Final Condition (OUTSIDE all loops)
| Left Value | ⚡ Dynamic content: SharePointIssueFound |
|---|---|
| Operator | is equal to |
| Right Value | true |
Step 10.2: In "If yes" - Check IssueDetails Not Empty
| Left Value | ⚡ Dynamic content: IssueDetails |
|---|---|
| Operator | is not equal to |
| Right Value | (Leave empty) |
Step 10.3: In Nested "If yes" - Post Teams Message
Add action: "Post message in a chat or channel" (Microsoft Teams)
| Post as | Flow bot |
|---|---|
| Post in | Channel |
| Team | Select your IT team |
| Channel | Select your alerts channel |
| Message | Type your message, inserting IssueDetails via Dynamic content: ๐จ SHAREPOINT SERVICE ALERT ๐จ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [Insert IssueDetails here] ๐ View in Admin Center: https://admin.microsoft.com/Adminportal/Home#/servicehealth ⏰ Alert Generated: [Insert utcNow() expression] |
๐งช Part 3: Test and Deploy
1Save and Test
- Click "Save" in the top right
- Click "Test"
- Select "Manually"
- Click "Test"
- Wait for the flow to complete (30-60 seconds)
- Check that all actions have green checkmarks ✅
✅ Expected Results
- Get Access Token: Returns a token (you'll see it in the outputs)
- Get Service Health: Returns 200 OK with service data
- Filter array: Returns SharePoint data only
- Teams message: Only sent if there's an ACTIVE issue
๐ง Troubleshooting Guide
| Error | Cause | Solution |
|---|---|---|
| 401 Unauthorized | Invalid credentials or missing consent | Check Tenant ID, Client ID, Client Secret. Verify admin consent was granted. |
| 403 Forbidden | Missing API permissions | Add ServiceHealth.Read.All permission and grant admin consent. |
| Filter array: Null | Wrong reference to parsed data | Use Expression: body('Parse_Service_Health')?['value'] |
| Old issues appearing | Missing status filter | Add condition: items('Loop_Issues')?['status'] ≠ serviceRestored |
| No Teams message | No active issues or IssueDetails empty | This is correct behavior! Check the Admin Center for actual issues. |
๐ Service Health Status Reference
| Status | Meaning | Alert? |
|---|---|---|
| investigating | Microsoft is investigating the issue | ✅ Yes |
| serviceDegradation | Service performance is degraded | ✅ Yes |
| serviceInterruption | Major service outage | ✅ Yes |
| extendedRecovery | Recovery is taking longer than expected | ✅ Yes |
| serviceRestored | Issue has been resolved | ❌ No (filtered out) |
| postIncidentReviewPublished | Post-incident review available | ❌ No (filtered out) |
๐ You Did It!
Your SharePoint Health Monitor is now active! You'll receive Teams alerts within minutes of Microsoft detecting any SharePoint issues.
Pro tip: Create similar flows for Exchange Online, Teams, OneDrive, and other critical services!
Comments
Post a Comment