Hi Team,
So till last week the step was working fine and good but suddenly it started failing without any changes made.
So what I was doing in below step is basically hosting an image or any other attachment to Azure DevOps as per Azure DevOps API documentation. The content bytes i'm sending is in Base64 so i've set "Body is Base64" to yes
As you can see in the above picture I'm passing the content bytes in the body which are in base64 encoded string and i've set body is base64 to yes also.
The step was good and working as expected but suddenly started giving me the following error :
The request indicated a Content-Type of "" for method type "POST" which is not supported. Valid content types for this method are: application/json, application/json-patch+json, application/octet-stream.
clientRequestId: 7917cf84-34ab-4fa9-afdd-758da12ff963
From the error it seems like I am passing the wrong content-type , but for base64 we generally use "application/octet-stream" which I'm actually passing in the request as you can see in the 1st image. Still its not taking my content.
Can someone please help me in this? its really blocking my already
Solved! Go to Solution.
Hi Team,
So I finally found the solution to the problem. But somehow its still not working with the actual step "Send an HTTP Request to Azure DevOps" but instead of that I have used a normal "HTTP" post step.
There's a change in which you need to pass the contents of the attachments in the body as you can see in the image below you need to add : "$content-type": "application/octet-stream; api-version=5.1" in the body of the request.
Also you are not able to pass the attachment content directly so you need to tweak it a little as I have done in the compose 14 step mentioned in the pic , the function inside goes like this :
It seems several users experiencing similar problem.
I have checked if there is any similar cases reported, but could not find.
Please open a service request.
@t-tatokuJust to be clear by service request you mean to say a request to Azure DevOps Services to Microsof Support at below link
https://azure.microsoft.com/en-us/support/devops/
I meant the support request from the Power Automate.
It will lead to the the same page as the Power Platform Help and support site as follows.
No Luck 😞
I think I need a different plan for that 😞
After some more research and different attempts I found a solution, which was to use an Azure Function to execute the image upload and attaching to the specified Work Item. See @hammer 's comment in this thread
Also I believe I found the reason why the DevOps connector for "Send an HTTP request to Azure DevOps" is yielding a corrupted image. See my comment in the same thread for details.
I have created a support ticket for this but at least have a working solution in the meantime.
Hi Team,
So I finally found the solution to the problem. But somehow its still not working with the actual step "Send an HTTP Request to Azure DevOps" but instead of that I have used a normal "HTTP" post step.
There's a change in which you need to pass the contents of the attachments in the body as you can see in the image below you need to add : "$content-type": "application/octet-stream; api-version=5.1" in the body of the request.
Also you are not able to pass the attachment content directly so you need to tweak it a little as I have done in the compose 14 step mentioned in the pic , the function inside goes like this :
Sorry, you need to have security roles such as Office 365 Global admin or Service support admin.
https://docs.microsoft.com/en-us/power-platform/admin/get-help-support
Has anyone been able to get this working with Node? I am able to get the byte array from the base64 string of the attachment sent from the flow but I am still getting corrupted contents.
Hello,
@t-tatoku, I stumbled upon a similar support ticket from a customer facing the same issue and started an internal thread to figure out how to fix the root cause. Could you please share the ongoing SRs on the issue so we can merge efforts?
Thanks,
Wassim WEHBI
User | Count |
---|---|
89 | |
37 | |
26 | |
13 | |
13 |
User | Count |
---|---|
127 | |
54 | |
38 | |
24 | |
21 |