cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Template Flow Fails - Error Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException

I used the template "Save my email attachments to a SharePoint document library". When clicking on Folders I get an error

{"error_description":"Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown."} in a pop up message. I chose instead to use the sender's email address as the folder. When the flow executes it seems to go fine until the outputs:
 
  • Headers
    { "Pragma": "no-cache", "x-ms-request-id": "71902fb4-7107-4f41-9bf0-d4b13375a294", "Cache-Control": "no-cache", "Date": "Tue, 23 Aug 2016 22:09:58 GMT", "Set-Cookie": "ARRAffinity=b74490127b7e9abd5ca516c58677cafe831ebedecba290e005ffca12aab2bbca;Path=/;Domain=127.0.0.1", "Server": "Microsoft-IIS/8.0,Microsoft-HTTPAPI/2.0", "X-AspNet-Version": "4.0.30319", "X-Powered-By": "ASP.NET", "Content-Length": "353", "Content-Type": "application/json; charset=utf-8", "Expires": "-1" }
  • Body
    { "status": 401, "message": "{\"error_description\":\"Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown.\"}", "source": "https://xxxxxxxxx-my.sharepoint.com/_api/sp.web.getweburlfrompageurl(@v)?@v='https%3a%2f%2fxxxxxxxxx...'", "errors": []

Is there an issue the service currently? Is there someplace to get alerts for service issues?

1 ACCEPTED SOLUTION

Accepted Solutions

I figured this out. It doesn't like me using the One Drive folder structure (https://company_name-my.sharepoint.com). The odd part is, this is where the SharePoint connection defaulted me to. I switched it over to our SharePoint URL and it worked fine.

View solution in original post

4 REPLIES 4
Community Support
Community Support

Hi KJulson,

 

Did you create a proper connection to SharePoint Online? When you try with other templates such as “save new email attachment to OneDrive for Business”, could you select folders?

 

I used the template to save new email attachment to SharePoint library, I can select Folders in SharePoint and no error message was popped up. Below is the folders displayed when I clicked the “Shower Picker” icon.

select folders.PNG


 Please check your connection with SharePoint Online. You could also try to use other templates to check if you can select folders.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I figured this out. It doesn't like me using the One Drive folder structure (https://company_name-my.sharepoint.com). The odd part is, this is where the SharePoint connection defaulted me to. I switched it over to our SharePoint URL and it worked fine.

View solution in original post

Hi KJulson,

 

I could not see your One Drive folder structure from this link. Could you provide a screenshot?
When we use SharePoint Online related actions, we need to create a proper connection to SharePoint Online. In the action, a SharePoint Site URL is needed. When we fill the proper SharePoint Site URL, we can get Folder Path or List name.

 

Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Mabel,

 

That is because the address provided was just an example. Hence the name of the company being "company_name".

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (6,893)