Forum Discussion
Apr 03, 2017
Using PowerShell to talk to the Office 365 Service Communications API
I want to use PowerShell to export the most recent week's worth of Admin Message Center Messages to a spreadsheet because I want to annotate each item with what I am planning to do about each announc...
Brian Teerlynck
Apr 23, 2018Copper Contributor
Hello Anne,
I'm using powershell to contact the service communication API's (connecting via the azure app)
Now i am able to get data from the API's but i want to set a filter that returns only data from a specific time. Do you have an idea how this filter should be built?
Get Messages
Description:
Returns the messages about the service over a certain time range. Use the type filter to filter for "Service Incident", "Planned Maintenance", or "Message Center" messages.
Service Description
| Path | /Messages | ||
| Filters | StartTime |
| |
I'm trying to create this uri with above filter:
"https://manage.office.com/api/v1.0/$tenant/ServiceComms/Messages?$filter=StartTime ge 'CurrentTime - 2 days'"
Source:
https://msdn.microsoft.com/en-us/office-365/office-365-service-communications-api-reference
Thanks in advance!
Brian
Dean_Gross
Jun 01, 2018Silver Contributor
Brian Teerlynckdid you ever figure out how to get this type of filter to work? or how to get just the messages from the Message Center?