Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello all,
I am new to PBI and looking for some help here.
I am using a GET method to pull the data through API. According to the API documentation a dynamic bearer token is requried for every api call. I was able to fetch the token and when i was able to use it in the Request Headers for API URL. However according to the API documentation a Date Header is required which is UTC timezone to be sent along with Authorization token as Request Headers. Below is the code that i am using.
Source = Value.Metadata(
Web.Contents(BaseURL,
[
Headers=[Authorization = Bearertoken, Date = TodaysDate
]
)),
However when i use Date in the Request Header the PBI is throwing an error
Expression.Error: The 'Date' header must be modified using the appropriate property or method.
Parameter name: name
Details:
Sun, 05 May 2024 07:12:37 GMT
According the API Documentation the Header name should exactly match to the text whcih is "Date". I tried multiple options but nothing worked out. I also tried in Postman and when i use Date as Header it is working fine and when i change the Date name to any other name such as "Dates" (adding "s" at the end) even in postman i see 401 unauthorized error. I am not sure how to handle this. Any help is greatly appreciated.
Hi, did you ever resolve this, as I'm having the same issue, with both Date and Host in the header.
Can you show the header for the successful Postman request? Maybe the date format is expected to be in ISO-8601.
It is not the date format that is causing the issue. Its the header (such as column header) .
For example Date = Sun, 05 May 2024 02:55:55 GMT - this is the format mentioned in API documentation.
The format for date i have is correct but when i use the name "Date" the M query is returning errors.
Error that i am getting is below
Try without the space. I don't think that is the right date format, btw.
Power BI Access this date format without any issue. Please refer to this link below
Representation of date/time values in headers (REST API) - Azure Storage | Microsoft Learn
Also according to the API Documentation this is what i have
Its the name of the Header that is causing the issue. You cant directly just write "Date" in M Query. But according the API documentation this is what it should be. Looking for some workaround here
If you have a Pro license you can open a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi
Otherwise you can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues .
Check out the July 2025 Power BI update to learn about new features.