Getting Client Context from Sharepoint return null
See original GitHub issueHello, We are trying to migrate from PnPCore. We used the following code to get a Client Context
using ( var auth = new OfficeDevPnP.Core.AuthenticationManager() )
using ( var ctx = auth.GetWebLoginClientContext( "https://mycompany.sharepoint.com" ) )
{
// Do something...
}
We tried to replace it by this code but the context returned is null
using ( var auth = new PnP.Framework.AuthenticationManager() )
using ( var ctx = auth.GetContext( "https://mycompany.sharepoint.com" ) )
{
// Do something...
}
Could you please advice?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Client Context executeQuery() works in console app but ...
I have the function GetDocumentLibrary which must return a libray from sharepoint site. When I execute it from a Visual Studio Console ...
Read more >Client Context is Coming as Null on the Host Web Remote ...
Here on the above code, the ClientContext will always be null. Hence, we are not able to proceed. For this, there is a...
Read more >Trying to list users in a sharepoint application returns null
I'm trying to list all users in my sharepoint using graphAPI using this code snippet: this.context.msGraphClientFactory.
Read more >Using Sharepoint CSOM, how to check for null when ...
How does one check if returned content type is found? ContentType cType = clientContext.Web.ContentTypes.GetById(contentType.Id); clientContext.
Read more >Object reference not set Error - Using UiPathTeam. ...
Unfortunately, we then get this error message and the SharePoint Application Scope does not work because the Client Context is NULL:.
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
Hi @jansenbe,
was there any progress on PnP.Framework.WebLogin package? I would say that there will be probably a lot of people having issue to create app id.
Thx, Oliver
Closing issue