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

Manually triggered flow fails with no authentication headers

I want to have a single flow that get's called from lots of libraries rather than recreating the same flow on each library using the For the Selected File trigger.

 

I have a simple flow that is triggered manually.

There is only one action which is to get file properties.

 

When the flow is called from a library (column formatted button) it has the itemID, siteURL and itemURL. This is enough to use the Get File Properties action. However this action fails with an error message saying:

 

The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_sharepointonline_1']['connectionId']' cannot be evaluated because property 'X-MS-APIM-Tokens' doesn't exist

 

When the flow is triggered from within the Flow service the get file properties action works (if i hard code what file to get).

The header's do contain the X-MS-APIM-Tokens attribute.

 

 

What is the point of manual triggered flows if they are given context information but no authentication info?!

 

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "span",
  "style": {
    "color": "#0078d7"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "=if([$File_x0020_Type] != '','Package', '')"
      }
    },
    {
      "elmType": "button",
      "style": {
        "border": "none",
        "background-color": "transparent",
        "color": "#0078d7",
        "cursor": "pointer"
      },
      "txtContent": "=if([$File_x0020_Type] != '','Archive', '')",
      "customRowAction": {
        "action": "executeFlow",
        "actionParams": "{\"id\":\"c4f63bab-b8a1-442d-95e0-78eb829e7258\"}"
      }
    }
  ]
}
1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @PeterVincent ,

 

Please choose the Library Name from the drop-down list.

1.png

Best regards,

Alice       

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

View solution in original post

6 REPLIES 6
v-alzhan-msft
Community Support
Community Support

Hi @PeterVincent ,

 

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

 

Best regards,

Alice       

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

 

flow3.png

 

flow4.png

v-alzhan-msft
Community Support
Community Support

Hi @PeterVincent ,

 

Please choose the Library Name from the drop-down list.

1.png

Best regards,

Alice       

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

View solution in original post

The drop down list does not have Site Pages.

 

I have a second flow that is currently moving pages into sub-folders in the Site Pages library of another site collection.

 

I am assuming that if manually entering the name of the library works for the Move File action then it would also work for the Get File Properties action.

 

I am testing this on a communications site collection, for background information.

Hi @PeterVincent ,

 

Does your issue still exists?

 

Best regards,

Alice       

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

Yes it does. There have been no other suggestions so nothing has changed.

I have tried with other libraries in other site collections but the same error happens.

Does Microsoft know that this is a reproducible bug in Flow?

Any help with solving this would be greatly appreciated.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (940)