cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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
Highlighted
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.

Highlighted

 

flow3.png

 

flow4.png

Highlighted
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

Highlighted

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.

Highlighted

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.

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Users online (3,322)