Send messages in channel using Graph api

Occasional Contributor

I am trying to send message to teams channel through graph api using python's msal library to get token. I am getting tokens but still receiving unauthorized access error while sending message. I have added permissions(delegated and application) as mentioned here  although token received only shows application permission.
I am not sure what else I am missing; I went through lots of docs:sad: but no luck. Any help will be highly appreciated.

Thank You!





Received token and error message as below.

Decoded Access Token
"aud": "",
"iss": "***********************/",
"iat": 1624887965,
"nbf": 1624887965,
"exp": 1624891865,
"aio": "E2Zg******************=",
"app_displayname": "********",
"appid": "dc75307f-4*****************",
"appidacr": "1",
"idp": "*************************/",
"idtyp": "app",
"oid": "2b5abfe6-********************",
"rh": "0.ARMA44eb_0jFPUuHg**************************.",
"roles": [
"sub": "2b5abfe6-73df-4b9***********",
"tenant_region_scope": "NA",
"tid": "ff9b8************47b**",
"uti": "cv5Y**************A",
"ver": "1.0",
"wids": [
"xms_tcdt": 1420304885
Token Expires at: 2021-06-28 20:21:05
{'error': {'code': 'UnknownError', 'message': '', 'innerError': {'date': '2021-06-28T13:51:08', 'request-id': '2cc385c5-85e4-4fde-824c-399bac232e1e', 'client-request-id': '2cc385c5-85e4-4fde-824c-399bac232e1e'}}}

0 Replies