To retrieve a SharePoint list from MS Teams using VB.net, you can use the Microsoft Graph API to query the SharePoint site within the MS Teams team. Here are the general steps:
Here is some example code to get started:
Dim graphClient As GraphServiceClient = New GraphServiceClient(authProvider)
' Replace the placeholders with the actual values for your SharePoint site and list
Dim siteId As String = "YOUR_SITE_ID_HERE"
Dim listName As String = "YOUR_LIST_NAME_HERE"
' Query the SharePoint list using the Microsoft Graph API
Dim listItems As IListItemsCollectionPage = Await graphClient.Sites(siteId).Lists(listName).Items.Request().GetAsync()
' Loop through the retrieved items and do something with each one
For Each item As ListItem In listItems.CurrentPage
Console.WriteLine($"Item ID: {item.Id}, Title: {item.Fields("Title")}")
Next
Asked: 2022-03-18 11:00:00 +0000
Seen: 8 times
Last updated: Dec 18 '21