question

BipinP-0506 avatar image
BipinP-0506 asked ·

Chat activity not available in V1.0 API and Beta API

I was looking into Add member and remove a member in chat but it doesn't have those requests in the documentation. Is any other way to do it or any different way to handle it please highlight this.

Please go through the following queries that I am searching for in the API request.

  1. Create a new chat

  2. Update chat name

  3. Add and Remove members from Chat

  4. Chat activities that which user added and removed in the Chat group.

For more details please see the attached snapshot.34261-chatactivity.jpg


azure-ad-graphoffice-teams-app-dev
chatactivity.jpg (264.9 KiB)
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

soumi-MSFT avatar image
soumi-MSFT answered ·

Hello @BipinP-0506, thank you for reaching out. Please find the answers to the points shared by you in the post:

  1. Create a new chat
    Ans: For creating a new chat in Microsoft Teams using the Graph API, you can use the following API:
    - POST https://graph.microsoft.com/v1.0/teams/{id}/channels/{id}/messages
    More details on this API can be found here: https://docs.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-1.0&tabs=http


  2. Update chat name
    Ans: For updating a chat message in Microsoft Teams using the Graph API, you can use the following APIs:
  3. Add and Remove members from Chat
    Ans: For adding or removing a member from the Teams chat using Graph API, you can use the following APIs:
  4. Chat activities that which user added and removed in the Chat group.
    Ans: There is no Graph API available to achieve this as of now.

Hope this helps.

Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as an Answer; if the above response helped in answering your query.



Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BipinP-0506 avatar image
BipinP-0506 answered ·

Thanks for replying @soumi-MSFT,

Please see below my explanation for my queries:
1) Create a new chat
You have provided me resource type of ChatMessage but I have asked for Chat resource type please do not conflict between ChatMessage and Chat.
Chat basically for a direct chat without a team.
I am trying to get those with the help of Get my chats. I am already aware of your given answers please highlight how we can create a new chat with one user or two users.

2) Update chat name
Same here I am asking for Chat update name, not the ChatMessage update. In this query, I want to update the Chat name. e.g. If the direct chat has two users named Bipin & John and Chat Name by default shows Bipin, John. Now I have to update to BJ Group. How I can achieve this.

3) Add and Remove members from Chat
Same here you have provided me, Team members API
I want an API request for Chat (Add Member/ Remove Member) Please see below URL I have tried in postman.
POST https://graph.microsoft.com/beta/me/chats/19:c170643f7fXXXXXX9c54d1aef1bca520@thread.v2/members
Following error occurred

 {
     "error": {
         "code": "UnknownError",
         "message": "",
         "innerError": {
             "date": "2020-10-22T09:37:34",
             "request-id": "604d0672-dddd-aaaa-bbbb-9dadf6bd2346",
             "client-request-id": "604d0672-dddd-aaaa-bbbb-9dadf6bd2346"
         }
     }
 }

Please see the below snapshot that I am asking about Chat, not about Team

34229-image.png

4) Permissions:
Azure AD is allowing only 30 API Permissions in App Registration. I am not allowing to add more permissions beyond 30 In the Azure Active directory. Any reason behind this to restrict only 30 API Permissions.
34332-image.png



image.png (76.6 KiB)
image.png (65.9 KiB)
10 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @BipinP-0506, I apologize for misinterpreting your query and posting the irrelevant details. Unfortunately for points 1,2, and 3 there are no APIs available yet.

1) Create a new chat
Ans: Graph API Not available for this.

2) Update chat name
Ans: Graph API Not available for this.

3) Add and Remove members from Chat
Ans: Graph API Not available for this.

4) Azure AD is allowing only 30 API Permissions in App Registration. I am not allowing to add more permissions beyond 30 In the Azure Active directory. Any reason behind this to restrict only 30 API Permissions.
Ans: I am trying to look for a suitable answer for this query as I do not have a ready answer on it yet. Let me get back to you on this soon.




0 Votes 0 · ·

Regarding the APIs for Teams, all the available APIs till now can be found on that same link that you mentioned: https://docs.microsoft.com/en-us/graph/api/resources/chat?view=graph-rest-beta

Any new additions to this list would also be visible under the same URL.

0 Votes 0 · ·

Are you trying to say APIs for Chats https://docs.microsoft.com/en-us/graph/api/resources/chat?view=graph-rest-beta this API resource type belongs to Chat.

The APIs for Team is different i.e. https://docs.microsoft.com/en-us/graph/api/resources/team?view=graph-rest-beta. I am waiting for your reply regarding the restricted 30 API permissions.









0 Votes 0 · ·
Show more comments