Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Custom Notification using Graph API

Posted on by

Hey Team!

On https://learn.microsoft.com/en-us/power-platform/admin/policies-communications it's stated that Microsoft deploys weekly updates and that there are two major events, as well as  there might be service incidents or planned maintenances.  All this information is posted on Microsoft 365 Admin Center under Health, and from there, we can choose the Service Health (for issues affecting specific technologies) or Message Center (for updates/notifications).  However, this information is only available to people with access to such Admin center (although tthere's an option to send a weekly bulletin to people on a specific list (max 2 mailboxes on the list)

pastedimage1683576380127v1.png

 

But it might happen that on large companies, Dynamics 365 Administrators or environment Administrators don't have access to this and therefore, they're not aware of these updates or status.  

so, How do we send an email to our Dataverse environment Administrators with the planned updates or system issues?  Well.  We can take advantage of a couple tools:  Microsoft Graph API and PowerAutomate.

 

Microsoft Graph API

On https://learn.microsoft.com/en-us/graph/api/resources/service-communications-api-overview?view=graph-rest-1.0&preserve-view=true we have some interesting information about using GRAPH API to retrieve messages (planned updates sent in advance of security/scheduled update) and Issues (Problems affecting availability of services).  We would need to build our query using GraphAPI to retrieve for example, Dynamics Messages and Dynamics Issues.  Please note that we'll be using the following information

https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http >> How to use QueryParameters

https://learn.microsoft.com/en-us/graph/api/serviceannouncement-list-messages?view=graph-rest-1.0&preserve-view=true&tabs=http >> To retrieve messages

https://learn.microsoft.com/en-us/graph/api/serviceannouncement-list-issues?view=graph-rest-1.0&preserve-view=true&tabs=http >> to retrieve incidents

This shows the sample GraphQuery to get the last 20 messages order by StartDate descending where the title of the message starts with "Dynamics":

graph.microsoft.com/.../messages desc&$top=20

As a result (showing only the first record)

pastedimage1683578510703v2.png

And this would be the graphQuery for a similar response for Incidents:

graph.microsoft.com/.../issues desc

pastedimage1683578667853v3.png

 

PowerAutomate

With the previous outcome (a pair of JSON files) we can take advantage of PowerAutomate, ot repeat the query by using an HTTP Request, then process the outcome to generate a table that we can use for example, to attach to an email:

pastedimage1683582951410v4.png

This would be an example of the table:

pastedimage1683583011955v5.png

With this information, we can then send an email to a set of users (that we read from a file, or from a SharePoint list).

 

Hope this helps!

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans