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

Custom connector body question

Hi all,

I'm trying to POST to graph and am creating a custom connector to send Teams chat messages.  The body is the below, with the only things that will be dynamic being the GUID in users(' ').  When I'm creating the definition, if I import this body, the "roles" token is missing - there's only 3 -- chatType, @odata.type, and user@odata.bind.  How do I make it so I can send the whole body - is it possible to send the whole body as a single variable to use in my app so I can just pass the whole thing as a blob of data?

 

Here's the post body i'm using from Create chat - Microsoft Graph beta | Microsoft Docs

{ "chatType": "oneOnOne", "members": [ { "@odata.type": "#microsoft.graph.aadUserConversationMember", "roles": ["owner"], "user@odata.bind": "https://graph.microsoft.com/beta/users('8b081ef6-4792-4def-b2c9-c363a1bf41d5')" }, { "@odata.type": "#microsoft.graph.aadUserConversationMember", "roles": ["owner"], "user@odata.bind": "https://graph.microsoft.com/beta/users('82af01c5-f7cc-4a2e-a728-3a5df21afd9d')" } ] }

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Hi @russrimm1 ,

 

Sorry i can't fully understand what you mean.

When using the API, do you encounter problems that prevent it from working properly?

 

When I import the body, the roles parameter is indeed not displayed. But when you use the app to call the api, it is necessary.

v-xiaochen-msft_0-1611546747920.png

v-xiaochen-msft_1-1611546889495.png

 

If you delete the "roles" column in the formula, the formula will report an error.

v-xiaochen-msft_2-1611546988509.png

 

So ,you could try this formula in your app:

CCC.chat({chatType:"oneOnOne",members:Table({'@odata.type':"#microsoft.graph.aadUserConversationMember",'roles':["owner"],'user@odata.bind':"https://graph.microsoft.com/beta/users('user id')"},{'@odata.type':"#microsoft.graph.aadUserConversationMember",'roles':["owner"],'user@odata.bind':"https://graph.microsoft.com/beta/users('user id')"})})

CCC is the name of my connection.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

1 REPLY 1
Microsoft
Microsoft

Hi @russrimm1 ,

 

Sorry i can't fully understand what you mean.

When using the API, do you encounter problems that prevent it from working properly?

 

When I import the body, the roles parameter is indeed not displayed. But when you use the app to call the api, it is necessary.

v-xiaochen-msft_0-1611546747920.png

v-xiaochen-msft_1-1611546889495.png

 

If you delete the "roles" column in the formula, the formula will report an error.

v-xiaochen-msft_2-1611546988509.png

 

So ,you could try this formula in your app:

CCC.chat({chatType:"oneOnOne",members:Table({'@odata.type':"#microsoft.graph.aadUserConversationMember",'roles':["owner"],'user@odata.bind':"https://graph.microsoft.com/beta/users('user id')"},{'@odata.type':"#microsoft.graph.aadUserConversationMember",'roles':["owner"],'user@odata.bind':"https://graph.microsoft.com/beta/users('user id')"})})

CCC is the name of my connection.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (18,905)