question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Want to connect to multiple SharePoint sites

See original GitHub issue

Category

  • 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:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
jansenbecommented, Oct 8, 2020

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.

0reactions
jansenbecommented, Oct 9, 2020

ok, seems you’ve a solution. Let’s close this issue. Please create new issues for the other things you encounter 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found