Forum Discussion
Web.contents Graph API call failing due to URL encoding
Hi All
I am troing to make an API call to MS Graph but it s failing as its trying to emcode the URL and some spaces and parentheses in the query string
let
Files = Json.Document( Web.Contents("https://graph.microsoft.com/v1.0/drives/b!GJT8RizEq0q7-RnHtwA_vFqcWj9HAP1PhkjgSX_Yv7vei88uo1NEQpvUMoDrmzoV/list/items?$filter=LastModifiedDateTime le 2022-12-30"
)),
value = Files[value],
#"Converted to Table" = Table.FromList(value, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
#"Converted to Table"but getting
DataSource.Error: Web.Contents failed to get contents from 'https://graph.microsoft.com/v1.0/drives/b!GJT8RizEq0q7-RnHtwA_vFqcWj9HAP1PhkjgSX_Yv7vei88uo1NEQpvUMoDrmzoV/list/items?$filter=LastModifiedDateTime%20le%202022-12-30' (400): Bad RequestSame thing happens if I try to do it with RelativePath and Query options
Any idea how to stop it from encoding those URLs?
Thanks
Hi kroman,
Sorry to know it didn’t help. Please consider reaching out to Microsoft Support. You can provide them with all the troubleshooting steps you've already taken, which will help them understand the issue better and provide a resolution. They might be able to identify something specific about your admin account setup or provide a solution that isn't immediately obvious.
Below is the link to create Microsoft Support ticket:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
Thanks and regards
6 Replies
- Omid_MotamediseSuper User
Make sure you have used the correct url.
- kromanHelper II
I did, tested it in MS Graph explorer
- v-nmadadi-msftCommunity Support
Hi kroman,
Thanks for reaching out to the Microsoft fabric community forum.Please make sure that start time follows the ISO 8601 format and also provide end time as well.
List group calendarView - Microsoft Graph v1.0 | Microsoft Learn
Please re try after adding them both.
Did I answer your question? Mark my post as a solution, this will help others!If my response(s) assisted you in any way, don't forget to give "Kudos"
Thanks and Regards- kromanHelper II
And how does it aply in my case? 😕
I was using following howto - https://learn.microsoft.com/en-us/graph/filter-query-parameter?tabs=http- v-nmadadi-msftCommunity Support
Hi kroman,
Sorry to know it didn’t help. Please consider reaching out to Microsoft Support. You can provide them with all the troubleshooting steps you've already taken, which will help them understand the issue better and provide a resolution. They might be able to identify something specific about your admin account setup or provide a solution that isn't immediately obvious.
Below is the link to create Microsoft Support ticket:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
Thanks and regards
- v-nmadadi-msftCommunity Support
Hi kroman ,
We are following up once again regarding your query. Could you please confirm if the issue has been resolved through the support ticket with Microsoft?
If the issue has been resolved, we kindly request you to share the resolution or key insights here to help others in the community. If we don’t hear back, we’ll go ahead and close this thread.
Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.
Thank you for your understanding and participation.