Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 1.32 KB

microsoft-applications.md

File metadata and controls

39 lines (32 loc) · 1.32 KB

graph explorer, swagger how to use

microsoft teams example teams read all messages

** please, login to microsoft **

afterward you can retrieve "Access token"

TOKEN=eyJ0eXAiOiJKV1QiLCJub25jZSI6I...

"my joined teams"

curl 'https://graph.microsoft.com/v1.0/me/joinedTeams' -H "Authorization: Bearer $TOKEN" | jq .

find out one of the channel and retrieve "id" of it, like: "id": "45626dcc-04da-4c2f-a72a-b28b",

GROUP_ID=45626dcc-04da-4c2f-a72a-b28b

"members of the channel "

curl https://graph.microsoft.com/v1.0/groups/$GROUP_ID/members  -H "Authorization: Bearer $TOKEN" | jq .

"channels of a team which I am member of"

curl https://graph.microsoft.com/v1.0/teams/$GROUP_ID/channels  -H "Authorization: Bearer $TOKEN" | jq .

retrieve value.id of the channel, like: "id": "19:[email protected]",

CHANNEL_ID="19:[email protected]"

read messages from the channel : "messages (without replies) in a channel"

curl https://graph.microsoft.com/beta/teams/$GROUP_ID/channels/$CHANNEL_ID/messages -H "Authorization: Bearer $TOKEN" | jq .value[].body.content