Store Team or channel unique id

Ronak Chotaliya 31 Reputation points
2022-06-28T13:39:17.187+00:00

Hi,

I have to store some unique id for the teams and channel because i need to know that which team or channel's files are coming from graph API.
so please help about how to store id and get this id from graph API.

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,188 questions
{count} votes

Accepted answer
  1. Meghana-MSFT 3,871 Reputation points Microsoft Vendor
    2022-07-08T07:56:09.92+00:00

    Moving from comments to Answer section -

    Please go through these List all Teams and List Channels documentation. It returns the unique ids of respective Teams and Channels.

    Please check this code in C# to download a file, You need to create GraphServiceClient first.

    GraphServiceClient graphClient = new GraphServiceClient( authProvider );  
      
    var stream = await graphClient.Me.Drive.Items["{driveItem-id}"].Content  
    	.Request()  
    	.GetAsync();  
    

    Please go through the Working with files in Microsoft Graph to store/download files. Please check this SDK documentation - https://learn.microsoft.com/en-us/graph/sdks/sdks-overview

    Thanks,
    Meghana


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.