Forum Discussion
Push Datasets - Datasets PostDataset 'The request could not be processed due to missing or invalid
- 5 months ago
Hi ejQap,
A 400 error on POST /datasets usually indicates that your JSON definition no longer passes schema validation or that the API has recently become more strict. It may also relate to authentication changes at tenant level. Validate the JSON structure carefully, test the request in the official API console, and confirm that your access token and permissions are still valid.Changes at tenant or Azure AD application level can cause:- expired or invalid tokens
- altered scopes
- loss of the Dataset.ReadWrite.All permission
In these cases, the service may return a 400 rather than a 403 due to the point at which validation fails.To confirm this, test a simple authorised request such as:If this also fails, the problem may relate to authentication rather than the payload.
Hi ejQap,
- expired or invalid tokens
- altered scopes
- loss of the Dataset.ReadWrite.All permission
- ejQap5 months agoAdvocate I
Thanks for your reply. I can confirm that our authentication is working fine, since other endpoints are functioning as usual.
The reason I’m asking is that We've been using the same payload for a couple of years and we haven’t made any recent changes. I can only assume there may have been a change in the API schema validation, but I am not able to find any related information.
Another thing I’d like to point out is that even the “Try It” feature in the documentation (https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset-in-group) no longer works when using the sample JSON payload.
I’m starting to lose direction on how to debug this, so I’ll go ahead and create a ticket. Thank you anyway.
- yukisnow15 months agoRegular Visitor
I also have the same issue since yesterday and we use the same payload for quite sometime. The status code is 400 and the request body is empty.
- yukisnow15 months agoRegular Visitor
I also tried to post the sample dataset given in the docs today, and still returning the same error.
It is the same error as when I post my own dataset. The status code is still 400 and the text is empty.
Traceback (most recent call last):
File "\.venv\Lib\site-packages\requests\models.py", line 974, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "AppData\Local\Programs\Python\Python311\Lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "powerbi_integration\main.py", line 471, in main
f"Dataset posted failed.details:{response.json()}",
^^^^^^^^^^^^^^^
File "\.venv\Lib\site-packages\requests\models.py", line 978, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- koueslati805 months agoNew Member
I’ve only had this problem since yesterday, even though nothing has changed.
However, I’ve noticed that I only have the permissions : [
‘Tenant.ReadWrite.All’,
‘Tenant.Read.All’
]Is those permissions no longer sufficient, and do I need to have the role mentioned in the resolution Dataset.ReadWrite.All?
- AntoGui4 months agoNew Member
Hi, it's not solved.
The issue is still occuring.
https://support.fabric.microsoft.com/known-issues/?product=Power%2520BI&active=true&fixed=true&sort=published&issueId=1772- yukisnow14 months agoRegular Visitor
Hi it was working for me early this morning, and also working this Monday.
- AntoGui4 months agoNew Member
Hi yukisnow1,
Thanks you, I was waiting a communication from Microsoft and i haven't tested today.
It's also work for me 🙂