cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JanSomers91
Level 8

Powerapps is performing run action instead of post? Help!

How could I resolve this error?

 

image.pngimage.png

8 REPLIES 8
Community Support Team
Community Support Team

Re: Powerapps is performing run action instead of post? Help!

Hi @JanSomers91,

 

Would you describe a little more about the configuration of your app? Were you trying to start a flow in app? How was the flow configured? Some screenshots would be better. What is the data sources and what are you trying to achieve? 

 

Also, I see the errors in screenshots are not in English, would you please help to translate it?

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JanSomers91
Level 8

Re: Powerapps is performing run action instead of post? Help!

Hi @v-monli-msft and thanks for your reply.

Basically I've started from a blank app and created a custom connector for a flow which triggers when an http-request happens.
This flow gets some query data and a file from the formData and creates a file (with metadata) in our sharepoint library. (see picture)image.png

I've fired the request multiple times in postman (application that helps you fire http requests) and everything worked as I wanted it to work. So then I decided to create a custom connector inside powerapps to allow me to fire the request with data from my app. There is not authentication and only 1 action described. Inside I set my sig, sp, sv, api-version to the values described in my flow's http request url.

image.png

 

 

Here are the contents of my open-api file (json) that I created using specgen: (some stuff is X'd out due to security reasons)

 

{
  "swagger": "2.0",
  "info": {
    "description": "Description",
    "version": "1.0.0",
    "title": "UploadExpenseNoteToSharepoint",
    "termsOfService": "https://prod-46.westus.logic.azure.com/terms-of-service",
    "contact": {
      "name": "XXXXXXXXX",
      "url": "XXXXXXXXXX",
      "email": "XXXXXXXXXXX"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "host": "prod-46.westus.logic.azure.com:443",
  "basePath": "/workflows",
  "schemes": [
    "https"
  ],
  "paths": {
    "/f7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/triggers/manual/paths/invoke": {
      "post": {
        "summary": "Post Expense Note to Sharepoint",
        "operationId": "PostExpense",       
        "responses": {
          "202": {
            "description": "Accepted"
          }
        },
        "parameters": [
          {
            "name": "content-type",
            "in": "header",
            "description": "",
            "required": true,
            "type": "string"
          },
          {
            "name": "api-version",
            "in": "query",
            "type": "string",
            "description": "",
            "required": true
          },
          {
            "name": "sp",
            "in": "query",
            "type": "string",
            "description": "",
            "required": true
          },
          {
            "name": "sv",
            "in": "query",
            "type": "string",
            "description": "",
            "required": true
          },
          {
            "name": "sig",
            "in": "query",
            "type": "string",
            "description": "",
            "required": true
          },
		   {
            "name": "filename",
            "in": "query",
            "type": "string",
            "description": "Name of the file",
            "required": true
          },
		    {
            "name": "nature",
            "in": "query",
            "type": "string",
            "description": "Nature of the expense",
            "required": true
          },
			{
            "name": "project",
            "in": "query",
            "type": "string",
            "description": "The Project the expense is linked to",
            "required": true
          },
			{
            "name": "payment",
            "in": "query",
            "type": "string",
            "description": "The Type of payment that was used for this expense",
            "required": true
          },
			 {
            "name": "payment-specification",
            "in": "query",
            "type": "string",
            "description": "A more detailed payment type",
            "required": true
          },
		 	{
            "name": "currency",
            "in": "query",
            "type": "string",
            "description": "The currency of the cost related to the expense",
            "required": true
          },
			 {
            "name": "cost",
            "in": "query",
            "type": "string",
            "description": "",
            "required": true
          },
			  {
            "name": "file",
            "in": "formData",
            "type": "file",
            "description": "Document linked to the expense",
            "required": true
          }			 
        ]
      }
    }
  }
}

 When I test my custom connector (either in powerapps or in the custom connector test tab) i get a 401 Response.

This is the request output:

image.png

 

 

And this is the response:image.png

 

 

This is the complete body but I didn't get much out of searching solutions for it:

 

{
  "error": {
    "code": "AuthorizationFailed",
    "message": "You do not have permissions to perform action 'run' on scope '/triggers/manual/paths/'. Verify you are making the request with the appropriate HTTP method. See http://aka.ms/logic-trigger for details."
  }
}

 If you need anything else , please let me know! 
Hopefully you can assist me Smiley Very Happy

Kind regards, Jan

JanSomers91
Level 8

Re: Powerapps is performing run action instead of post? Help!

@v-monli-msft Do you have any idea what could be wrong?

Fricandel
Level: Powered On

Re: Powerapps is performing run action instead of post? Help!

@JanSomers91,

I have the exact same problem here, did you receive an answer? Did you resolve the problem?

 

Kind regards,

Gerben

esbharad
Level: Powered On

Re: Powerapps is performing run action instead of post? Help!

I am facing the same issue. Was this resolved?

 

Stevenson
Level: Powered On

Re: Powerapps is performing run action instead of post? Help!

Hi,

 

Any Update on this problem? Has this been solved already?

THX!

Anonymous
Not applicable

Re: Powerapps is performing run action instead of post? Help!

I have the same problem. Did anyone find a solution for that? Please help

Highlighted
an1ta
Level: Power Up

Re: Powerapps is performing run action instead of post? Help!

I've had the same problem - I was getting the same error message eventhough everything was fine when i was using Postman.

 

For me the issue was in the sp parameter (it was encoding the '/' character)

After changing from sp=%2Ftriggers%2Fmanual%2Frun to
sp=/triggers/manual/run everything worked fine and I was able to run my flow.

 

Hope this helps.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 192 members 5,523 guests
Please welcome our newest community members: