service communications messages api
1 TopicUsing 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 announcement. #Governance I have an account for this purpose that is a global tenant admin and that does not use MFA. I believe I need to use the O365 Service Communication API (Preview) as described at https://msdn.microsoft.com/office-365/office-365-service-communications-api-reference, in particular with this REST URI: https://manage.office.com/api/v1.0/contoso.com/ServiceComms/Messages In PowerShell, there is the Invoke-RestMethod command. I'm passing the above URI (except with contoso.com replaced) for the value of the -URI parameter. However, for authentication, passing a Credential doesn't work. I need to create an Authorization Header with a value of Bearer and an AAD_Bearer_JWT_Token. I'm lost when it comes to creating that. Do I really need to set up an Application listing in Azure Ad for my PowerShell script, per https://msdn.microsoft.com/en-us/office-365/get-started-with-office-365-management-apis ? If so, beside the UI of the management portal having been redone, I don't see the Service Communication APIs being listed as an option when I am supposed to grant the application permission to access them. Can anyone shed some light on this? paulschaeflein Dean_Gross Anna Chu Todd Klindt Anne Michels Peter Walke21KViews0likes19Comments