cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mfcalmeida
Level: Powered On

Face API: InvalidUrl

Hi!

 

I'm trying to run facial recognition on a picture stored inside SharePoint Online

 

I do the following steps:

 

1. Create Person Group

2. Create Person

3. Get Items from Picture library (the returned picture url is correct)

4. Add a Person Face

 

Step 4 fails with the following message: 

{
  "error": {
    "code""InvalidURL",
    "message""Invalid image URL or error downloading from target server. Remote server error returned: \"Response status code does not indicate success: 403 (FORBIDDEN).\""
  }
}

 

From what I understand, Cognitive Services is not be able to login to SharePoint to retrieve the file.

How can I establish a connection between the two?

 

Thanks! 

1 ACCEPTED SOLUTION

Accepted Solutions
mfcalmeida
Level: Powered On

Re: Face API: InvalidUrl

Hi @v-yuazh-msft,

 

Indeed it seems like a limitation of flow.

I no longer haver the original flow as I've found a workaround.

 

But basically what I had initially was:

 

nok1.png

 

1. Get the list item with the SharePoint: Get Items action;

2. Call the Face API: Add a person face and pass the "Link to Item" from the previous action as the Picture URL

This action fails as the Face API is unable to authenticate to SharePoint and access the file.

 

The workaround that I found was basicaly:

 

ok1.png

1. Get the list item with the SharePoint: Get Items

2. Get the File Content through the items "ID" from the preivous actions 

ok2.png

3. Create a file on the OneDrive for Busines with the file content from the previous action

4. Create a Shared URL from with a direct link to the document

 

ok3.png 

5. Call the Face API: Add a person face and pass the url created in the previous step as the picture URL. 

 

 

Like I mentioned earlier, this is a workaround and not a solution for the actual problem.

While Face API expects a URL that points to a file, other services like Computer Vision work directly with the file content, which in this case, would be a lot more simple.

 

If someone else has a better solution please feel free share 🙂

 

Thanks

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Face API: InvalidUrl

Hi @mfcalmeida,

 

Could you please share a screenshot of the configuration of your flow?

 

As you said, I afraid that Cognitive Services is not be able to login to SharePoint to retrieve the file.

I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

If you would like this feature for Cognitive Services to login to SharePoint to retrieve the file to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Also you could take a try to retrieve the file from other file path to achieve your needs.

 

Best regards,

Alice

 

Best regards,

Alice

Administrator
Administrator

Re: Face API: InvalidUrl

Hey, @mfcalmeida!

 

It appears as though @v-yuazh-msft would like some more information in order to further assist you properly with your issue. Please share any additional information that was requested in order to decrease the amount of time that it will take for you to be assisted!

 

Thank you for being an active member of the Flow Community!

-Gabriel
Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!
mfcalmeida
Level: Powered On

Re: Face API: InvalidUrl

Hi @v-yuazh-msft,

 

Indeed it seems like a limitation of flow.

I no longer haver the original flow as I've found a workaround.

 

But basically what I had initially was:

 

nok1.png

 

1. Get the list item with the SharePoint: Get Items action;

2. Call the Face API: Add a person face and pass the "Link to Item" from the previous action as the Picture URL

This action fails as the Face API is unable to authenticate to SharePoint and access the file.

 

The workaround that I found was basicaly:

 

ok1.png

1. Get the list item with the SharePoint: Get Items

2. Get the File Content through the items "ID" from the preivous actions 

ok2.png

3. Create a file on the OneDrive for Busines with the file content from the previous action

4. Create a Shared URL from with a direct link to the document

 

ok3.png 

5. Call the Face API: Add a person face and pass the url created in the previous step as the picture URL. 

 

 

Like I mentioned earlier, this is a workaround and not a solution for the actual problem.

While Face API expects a URL that points to a file, other services like Computer Vision work directly with the file content, which in this case, would be a lot more simple.

 

If someone else has a better solution please feel free share 🙂

 

Thanks

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

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