Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Specified HTTP method is not allowed for the request target.

(0) ShareShare
ReportReport
Posted on by 147

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
  • Verified answer
    Ananda Profile Picture
    147 on at
    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..

     

  • Ananda Profile Picture
    147 on at
    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

  • JohnAageAnderse Profile Picture
    1,986 on at
    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

  • Ananda Profile Picture
    147 on at
    Re: Specified HTTP method is not allowed for the request target.

    Thank you John,

    I've tried with Post, but same result.

     

    ananda

  • JohnAageAnderse Profile Picture
    1,986 on at
    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

  • JohnAageAnderse Profile Picture
    1,986 on at
    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

  • Ananda Profile Picture
    147 on at
    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

     

  • JohnAageAnderse Profile Picture
    1,986 on at
    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow