cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Specified HTTP method is not allowed for the request target.

Specified HTTP method is not allowed for the request target.
I'm trying to create team using flow.

Getting error at Http action, Prior to this, all steps are successfully executed,

Any idea??

---------- 

Method=Put

Header = 

{
  "Content-type""application/json",
  "User-Agent""Mozilla/5.0"
}
Getting below error.
{
  "error": {
    "code""Request_BadRequest",
    "message""Specified HTTP method is not allowed for the request target.",
    "innerError": {
      "date""2020-07-21T06:25:12",
      "request-id""96352c6f-a56f-4802-8110-00944745a4ef"
    }
  }
}
Thank you
ananda
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: Specified HTTP method is not allowed for the request target.

Http Post will not work. The method has to be Put.

There were also some glitch on Graph API permission,

Finally it worked..

 

View solution in original post

8 REPLIES 8
Highlighted
Super User II
Super User II

Re: Specified HTTP method is not allowed for the request target.

Hello @ananda 

 

Please explain what you are trying to do using the PUT request! A screenshot of the action definition (expanded) would be appreciated.

Kind regards, John

Highlighted
Resolver I
Resolver I

Re: Specified HTTP method is not allowed for the request target.

Hi John

I'm trying to create Team using Power Automate.

I'm getting error at the last step. Please find attached the screen sorts.

Azure, API Permission - 

User.ReadWrite.All-Application
Directory.ReadWrite.All-Delegated
Directory.ReadWrite.All-Application
Group.ReadWrite.All-Delegated
Group.ReadWrite.All -Application
Sites.Read.All -Application
Team.Create - Delegated
Team.Create - Application
Team.ReadBasic.All -Delegated
Team.ReadBasic.All - Application

 

Thank you for your help.

PA1.pngPA2.pngPAError.png

 

Highlighted
Super User II
Super User II

Re: Specified HTTP method is not allowed for the request target.

Hello @ananda 

 

Thank you for the information. I just checked the documentation for the Graph api that you are using:

https://docs.microsoft.com/en-us/graph/api/team-post?view=graph-rest-beta&tabs=http

 

You should use POST, not PUT as the request method. [Edit} I stand corrected, it also allows a PUT!:

https://docs.microsoft.com/en-us/graph/api/team-put-teams?view=graph-rest-beta&tabs=http

Kind regards, John

Highlighted
Super User II
Super User II

Re: Specified HTTP method is not allowed for the request target.

Hello @ananda 

 

Your API call is missing the ID value in the URI so it appears as ".../groups//teams" - note the double slashes!

Check that the ID is actually there.

Kind regards, John

Highlighted
Resolver I
Resolver I

Re: Specified HTTP method is not allowed for the request target.

Thank you John,

I've tried with Post, but same result.

 

ananda

Highlighted
Super User II
Super User II

Re: Specified HTTP method is not allowed for the request target.

Hello @ananda 

 

One of your compose actions are not resulting in a value

InkedPAError_LI.jpgInkedPAError0.jpg

The ID is empty, so results in "//" in the URI! Check your compose action.

Kind regards, John

Highlighted
Resolver I
Resolver I

Re: Specified HTTP method is not allowed for the request target.

Hello John,

Thanks for pointing that, Fixed that ID, 

Now URL is coming like - https://graph.microsoft.com/beta/groups/90e5cf1e-fa61-4017-ab2c-4aba9fc8437f/team

But with a different error - 

Action 'HTTP_Create_Team_for_New_Group' failed

{"error":{"code":"UnknownError","message":"","innerError":{"date":"2020-07-21T17:11:16","request-id":"e141eceb-bba6-4d72-a09c-fdb230a20727"}}}

A quick question. Do we need azure licence ? As Http action is premium.

 

Thank you

Highlighted
Resolver I
Resolver I

Re: Specified HTTP method is not allowed for the request target.

Http Post will not work. The method has to be Put.

There were also some glitch on Graph API permission,

Finally it worked..

 

View solution in original post

Helpful resources

Announcements
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.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Users online (8,962)