cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
DLGross
Level 8

Enter a valid uri error when trying to get data from Office Message Center

When I try to get a Message from the message center using an HTTP Get with the following uri "https://manage.office.com/api/v1.0/tenant-id/ServiceComms/Messages?$filter=MessageType eq 'Message Center'"

I get an error message to "Enter a valid URI". 

Can anyone tell me what I'm doing wrong?

Dean Gross

Office 365- MSCA
SharePoint - MCSE
Microsoft 365 Enterprise Administrator Expert
5 REPLIES 5
Community Support Team
Community Support Team

Re: Enter a valid uri error when trying to get data from Office Message Center

Hi @DLGross,

 

Could you please share a screenshot of your flow's configuration?

 

The error message told that there is something wrong with the uri that you provided. The $filter query option is not supported in Get Messages function of Office 365 Service Communications API.

 

Please modify your URL within your HTTP action as below:

https://manage.office.com/api/v1.0/tenant-id/ServiceComms/Messages?MessageType='Message Center'

Then try your flow again to check if the issue is solved on your side.

 

More details about the Get Message function of the Office 365 Service Communications API, please check the following article:

Get Message function

 

Please check and see if the following article would help in your scenario:

https://msdn.microsoft.com/office-365/get-started-with-office-365-management-apis

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
DLGross
Level 8

Re: Enter a valid uri error when trying to get data from Office Message Center

@v-xida-msftthanks for the suggestion, but removing the $filter does not eliminate the error. I was already using those same articles that you provided links to but I'm not seeing anything that states $filter is not supported. Below is the revised flow

Picture1.png

 

 

Dean Gross

Office 365- MSCA
SharePoint - MCSE
Microsoft 365 Enterprise Administrator Expert
DLGross
Level 8

Re: Enter a valid uri error when trying to get data from Office Message Center

I have run some more tests and this uri runs, https://manage.office.com/api/v1.0/tenant-id/ServiceComms/Messages?MessageType=MessageCenter but the results are not filtered by the Message Type. I am getting all of the messages, (Incidents, and MessageCenter. 

 

Per the recommendations of @Paul Shaflein, https://www.schaeflein.net/filter-using-enum-values-in-odata-v4/ I have tried  https://manage.office.com/api/v1.0/tenant-id/ServiceComms/Messages?MessageType=Microsoft.Office365Se...' and I get the same results, i.e, the filter does not remove the Incidents. 

 

I have also tried to filter using the Workload and that does not remove any messages. There appears to be a bug in either how Flow works with the O365 Service api, or with that API

Dean Gross

Office 365- MSCA
SharePoint - MCSE
Microsoft 365 Enterprise Administrator Expert
sgreenlee11
Level: Power Up

Re: Enter a valid uri error when trying to get data from Office Message Center

Hi Dean,

 

How about this:

 

https://manage.office.com/api/v1.0/tenant-id/ServiceComms/Messages?$filter=MessageType eq Microsoft.Office365ServiceComms.ExposedContracts.MessageType'MessageCenter'
 
I am seeing the filtering work properly both hitting the API directly, and using a custom connector in Flow.
 
Thanks,
 
Sean
Administrator
Administrator

Re: Enter a valid uri error when trying to get data from Office Message Center

Hello,  @DLGross!

Have you had an opportunity to apply @sgreenlee11‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!


Thank you for being an active member of the Flow Community!

-Gabriel
Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,052)