I am trying to publish a Power BI report using Power BI REST APIS but i get a RequestedFileIsEncryptedOrCorrupted error.
Documentation for the Power BI request can be found at https://docs.microsoft.com/en-us/rest/api/power-bi/imports/postimportingroup.
Here are the steps I am following
1. Create a temperary Blob Location
Request
```
POST /v1.0/myorg/groups/{groupId}/imports/createTemporaryUploadLocation HTTP/1.1
Host: api.powerbi.com
Authorization: Bearer {token}
User-Agent: PostmanRuntime/7.20.1
Accept: */*
Cache-Control: no-cache
Host: api.powerbi.com
Accept-Encoding: gzip, deflate
Content-Length: 0
Connection: keep-alive
cache-control: no-cache
```
which returns the following data
```
{
"@odata.context": "",
"url": "",
"expirationTime": ""
}
```
2. Push file to temp blob location
then using the url I send the following request
```
PUT {url from step 1} HTTP/1.1
Host: wabieus2bppbiv2.blob.core.windows.net
x-ms-blob-type: BlockBlob
User-Agent: PostmanRuntime/7.20.1
Accept: */*
Cache-Control: no-cache
Host: wabieus2bppbiv2.blob.core.windows.net
Content-Type: multipart/form-data;
Accept-Encoding: gzip, deflate
Content-Length: 2057012
Connection: keep-alive
cache-control: no-cache
Content-Disposition: form-data; name="file"; filename="{local pbix file path here}
```
This request responds with a 201 created
Then I send the publish report call
```
POST /v1.0/myorg/groups/{groupId}/imports?datasetDisplayName={name}& nameConflict=CreateOrOverwrite& skipReport=False HTTP/1.1
Host: api.powerbi.com
Content-Type: multipart/form-data;
cache-control: no-cache
Content-Disposition: form-data; name="fileUrl"
{url from step 1}
```
I get a 400 Bad Request Error with the folowing data
```
{
"error": {
"code": "RequestedFileIsEncryptedOrCorrupted",
"pbi.error": {
"code": "RequestedFileIsEncryptedOrCorrupted",
"parameters": {},
"details": [],
"exceptionCulprit": 1
}
}
}
```
Expected Behavior: Report published to Power BI Service
Actual Behavior: RequestedFileIsEncryptedOrCorrupted Error