Want to connect to multiple SharePoint sites
See original GitHub issueCategory
- Bug
Describe the bug
I want to access multiple SharePoint sites, but it stops after the second authentication.
Steps to reproduce
I made the following settings to access multiple SharePoint sites.
Based on DEMO.WPF.
appsettings.js
"Sites": {
"Site_A": {
"SiteUrl": "https://my.sharepoint.com/sites/msteams_a",
"AuthenticationProviderName": "InteractiveFlow"
},
"Site_B": {
"SiteUrl": "https://my.sharepoint.com/sites/msteams_b",
"AuthenticationProviderName": "InteractiveFlow"
}
}
MainWindow.xaml.cs
internal async Task SiteInfoAsync()
{
using (var context = await pnpContextFactory.CreateAsync("Site_A"))
{
var web = await context.Web.GetAsync(w => w.Title, w => w.Description, w => w.MasterUrl);
~
}
using (var context = await pnpContextFactory.CreateAsync("Site_B"))
{
var web = await context.Web.GetAsync(w => w.Title, w => w.Description, w => w.MasterUrl);
~
}
}
A deadlock occurs after the second authentication.
Expected behavior
If possible, I would like to authenticate once and access multiple SharePonit sites.
Environment details (development & target environment)
- SDK version: 0.3.6-preview3
- OS: Windows 10
- SDK used in: Console App
- Framework: .NET 5
- Browser(s): Microsoft Edge 85.0.564.70
- Tooling: VS Code
I’m translating English, so I’m sorry if I make a mistake.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Associate a SharePoint site with a hub site
On your site, select Settings · In the Edit site information panel, under Hub site association, select the hub site with which you...
Read more >How to Connect CRM to Multiple SharePoint Sites
To get more than one SharePoint site connected, walk each site through Document Management Settings inside of the CRM. This will create the ......
Read more >Sync two SharePoint Lists: A Quick and Easy Guide - YouTube
I've had problems with syncing two lists in sharepoint for about 2 ... Use SharePoint Lists just like a Relational Database in Power...
Read more >Combine SharePoint Lists Data Using Power BI - YouTube
This video will explain how to combine multiple SharePoint list data ... 00:00 Intro • 00:42 Connect Power BI Desktop to SharePoint Lists ......
Read more >2 ways to link pages in SharePoint Online - YouTube
In case you need to link the two pages together in SharePoint, I provide a few ways for you to do so in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for reporting this @RYO-4947123 . I’ve checked our authentication handler code and we accidently left a few GetAwaiter().GetResult() calls in there which results in a blocking thread. These issues have been fixed and I’ve tested your scenario with the latest bits and things do work as expected.
There will be a nightly nuget package update, so if you tomorrow update to the latest nuget then this should work. I might even release an intermediate nuget during the day, and then I’ll let you know in this thread.
ok, seems you’ve a solution. Let’s close this issue. Please create new issues for the other things you encounter 😃