Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

The auth token (JWT) acquiring method does not work for me #24

Open
trueif opened this issue Aug 11, 2022 · 2 comments
Open

The auth token (JWT) acquiring method does not work for me #24

trueif opened this issue Aug 11, 2022 · 2 comments

Comments

@trueif
Copy link

trueif commented Aug 11, 2022

Hi experts,

I do not find the "Chat.Read" permission under "modify permissions". This method does not work for me. Are there any alternatives?


Auth token (JWT) - this is needed for calling Microsoft Graph APIs.

Go to https://developer.microsoft.com/en-us/graph/graph-explorer. At the left side, under Authentication, click "Sign In with Microsoft"
After having logged in, on the left side (where you clicked for login), click "modify permissions". Enable Chat.Read and re-login (like it states).
The URL contains the token (#access_token=<long token goes here>). Copy this value. Or make any random call in the sandbox and copy the Authorization request header either from the JS console (without Bearer in front of it) or from the "Access token" tab of the Graph Explorer page.

Target directory name - is the name to use for the export (will be created in the out directory in this project).

@trueif
Copy link
Author

trueif commented Aug 16, 2022

It works now. New method is:

  1. Go to https://developer.microsoft.com/en-us/graph/graph-explorer
  2. Find in the left pane: Microsoft Teams -> create chat, click it
  3. In the top middle pane, switch to GET method
  4. Click "Modify permissions (preview)", enable (click Consent) Chat.ReadWrite permission
  5. Click "Run query"
  6. Check in the response preview, your recent active chats are listed such as:
    { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats", "@odata.count": 19, "@odata.nextLink": "https://graph.microsoft.com/v1.0/chats?$skiptoken=1.kscDYxxxIw", "value": [ { "id": "19:[email protected]", "topic": "xxx",
  7. Then click "Access token", and copy the long token text.

@vu5
Copy link

vu5 commented Sep 10, 2022

Thank you, this is helpful.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants