Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Re: Problem with ComputerVisionAPI (Microsoft Cognitive Services) - "InvalidImageUrl"

Understanding the problem and a lot of reading, the problem is powerapps base64 image-format and all api, endpoints from computervision API, sharepoint, onedrive etc. are expecting binary file format.

Level: Powered On

Re: Problem with ComputerVisionAPI (Microsoft Cognitive Services) - "InvalidImageUrl"

@steeleyj Thanks for your suggestion. Can you please tell what are the parameters you are passing from powerapps to Azure function with an example. I am not able to pass the image url from my custom image gallery.

Super User
Super User

Re: Problem with ComputerVisionAPI (Microsoft Cognitive Services) - "InvalidImageUrl"

I got the ComputerVisionAPI (v2) working directly in PowerApps (without using FLOW) but only for describing (tagging) images.


The ComputerVisionAPI command DescibeImageContent will take as an argument the image property from the Add Picture control as follows:


ClearCollect(colImageDesc, ComputerVisionAPI.DescribeImageContent(UploadedImage2.Image).description)

This returns a table with a single row (I guess as a single image was submitted) with two columns - 'captions' and 'tags'. Each of the two columns contain an embedded table. In the code above I am capturing the returned table in a collection 'colImageDesc'.


Captions is a table that contains a single row with two columns: 'confidence' and 'text' where 'text' is a description/caption for the image and 'confidence' is a % representing how likely it is that the descption/caption is correct.


To display the caption, you can add a label with the following formula for the Text property (take the first row from colImageDesc, take the captions value (a table) then take the first row from the captions table and the entry from the text column).



To show the confidence, add another label with the following formula for the Text property:


I've used a round function to limit the display to just 2 decimal places.


Tags is a single column 'value' with multiple rows and lists tags (person, car, beach, etc.) representative of the image. There is no confidence rating returned, but it seems to list the tags from 'better' (most confident) to 'worse' (least confident).


An easy way to display this is to add a datatable and set the Items property as follows:


Given that the tags appear to be listed from 'most likely to apply to least likely to apply' you could use a FirstN function to limit to the first 5 results or so.


All the other ComputerVision commands appear to require 'format' and 'string' as arguments and as others here have found, there appears to be no way to pass these arguments directly from PowerApps in a way that the ComputerVision API will accept. 


Fingers crossed for an update to PowerApps and/or ComputerVision to get more of the commands (especially OCR, I can see a lot of potential applications for that) working within PowerApps without resorting to FLOW, Azure Functions, etc.


Hope this info helps someone.



Helpful resources


Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,511)