Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
mcorlou
New Member

OData + MS Graph header timezone problem

Hello,

i try to retrieve data from ms graph and powerquery, i've a request like this :

 

let
    Calendar = (Account as text) as table=>
let
    Source = OData.Feed("https://graphproxybi56lor.azurewebsites.net/v1.0/users/"&Account&"/calendarview?startdatetime="& Date.ToText(Date.AddMonths(DateTime.Date( DateTime.LocalNow() ),-6), "yyyy-MM-dd") &"T00:30:00.048Z&enddatetime="& Date.ToText(DateTime.Date(DateTime.LocalNow()), "yyyy-MM-dd") &"T23:30:00.048Z&$select=subject,start,end,categories",[Prefer = "outlook.timezone='Europe/Paris'"], [Implementation="2.0"]),
    Calendrier = Source
in
    Calendrier
in
    Calendar

the part [Prefer = "outlook.timezone='Europe/Paris'"] dont work, i always have UTC time zone Smiley Sad,  in graph explorer i've try and the request work , but i don't know how to pass arguments correctly in powerquery.

 

Thank for your help

 

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @mcorlou 

Is this problem sloved? 
If it is sloved, could you kindly accept it as a solution to close this case?
If not, please let me know.
 
Best Regards
Maggie
v-juanli-msft
Community Support
Community Support

Hi @mcorlou 

If you connect to MS Graph API with Power BI Desktop, you could refer to these similar thread:

https://community.powerbi.com/t5/Desktop/Use-Microsoft-Graph-API-as-data-source/td-p/640426

https://docs.microsoft.com/en-us/power-query/samples/mygraph/readme

As the creator of that thread said below, it worked, could you check if it works for you?

I added the parameters in an extra file like:

{
"schedules": [
"room1@my.com",
"room1@my.com"
],
"startTime": {
"dateTime": "2019-03-01T09:00:00",
"timeZone": "Central European Time"
},
"endTime": {
"dateTime": "2019-04-01T09:00:00",
"timeZone": "Central European Time"
},
"availabilityViewInterval": "15"
}

 

And indeed, if I add this like:

source = Json.Document(Web.Contents(url,[ Headers = [#"Content-Type"="application/json"], Content = Text.ToBinary(params) ] ))

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors