Skip to main content

Notifications

Power Automate - Connector Development
Answered

The API operation 'CreateTeam' requires the property 'body' to be of type 'String' but is of type 'Object'.'

(1) ShareShare
ReportReport
Posted on by 265

So I moved my working flow to a new tenant and discovered that MFA was required and found out that I must make a Custom Connector which can store logins and thus handle MFA.

The great news: I have made the CC and the Team gets created using the connector in the flow (Test in the CC also is succesful)

The bad news: I get the error below and the rest of my flow fails:

The API 'iw-20graph-20connector-5f6488149dd6d8968a-5f670f56d6dd614cb0' returned an invalid response for workflow operation 'Create_a_Microsoft_Team' of type 'OpenApiConnection'. Error details: 'The API operation 'CreateTeam' requires the property 'body' to be of type 'String' but is of type 'Object'.'

 

 

The Error in GUI:

ThomasDK_0-1640795265177.png

 

 

Now, I have searched this board for answers and seen some posts like mine, but the answers does not help me. I hope you can give a clue, so I can get it to work. The error saies that the body should be of type "String" and not "Object". Is that determined by the header, which is configured like this in the CC:

ThomasDK_2-1640795557192.png

 

I even created a policy to force this header (it made no difference):

ThomasDK_3-1640795636276.png

 

Then I looked in the swagger editor to see if the code had been changed. It looks fine and the "scheme" is set to "String", as can be seen here:

 

ThomasDK_1-1640795455377.png

 

 

I hope you can tell me what is wrong with my API response.

 

Best regards,

Thomas

 

 

  • matheusosa Profile Picture
    matheusosa 3 on at
    Re: The API operation 'CreateTeam' requires the property 'body' to be of type 'String' but is of type 'Object'.'

    Yes! What I did was:

    - Created a new connection and assigned it to all my actions that used it. Then, after saving it, I deleted the old connections. 

  • Verified answer
    ThomasDK Profile Picture
    ThomasDK 265 on at
    Re: The API operation 'CreateTeam' requires the property 'body' to be of type 'String' but is of type 'Object'.'

    I have now resolved this by removing my custom connector from the flow and adding it again. I think that I also could have disconnected and reconnected the connector under "Connectors".

  • ThomasDK Profile Picture
    ThomasDK 265 on at
    Re: The API operation 'CreateTeam' requires the property 'body' to be of type 'String' but is of type 'Object'.'

    Hi all,

     

    I still haven't found a solution to this problem. It's probably a small thing, but I can't see what is wrong.

     

    Br,

    Thomas

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,304

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard

Featured topics