You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.
At the outset apologies, if this is not the right group to address the issue.
Issue:
Unable to authenticate the Sharepoint url from Azure function, while its works good in my local environment.
Here is the code-snippet.:
using Microsoft.SharePoint;
using Microsoft.SharePoint.Client;
using SharePointPnP;
/*
....
*/
string siteUrl = "https://abcd.sharepoint.com/xyz/abcd123";
string clientId = "aaaaa-bbbbb-ccccc-ddddd-eeeeeeeee";
string clientSecret = "lalalalalalalalalalalalalalalalalalall=";
var clientContext = new OfficeDevPnP.Core.AuthenticationManager().GetAppOnlyAuthenticatedContext(siteUrl, clientId, clientSecret);
The last line throws error..
Works good in local (.Net frame work 4.x) and but fails to authenticate in Azure function (.Net Core 2)
Is there any alternative PnP in Azure function on .Net Code2.1?
Would be great if someone throw lights on correct Assemblies to be used or some solution.
Thanks,
Venkatesh Kanale
The text was updated successfully, but these errors were encountered:
Hi I am also using same code and my targeted version is .Net Core 3.1 getting below error : The type initializer for 'OfficeDevPnP.Core.Utilities.TokenHelper' threw an exception.
---> System.TypeLoadException: Could not load type 'System.Web.Configuration.WebConfigurationManager' Please help me on this.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi Team,
At the outset apologies, if this is not the right group to address the issue.
Issue:
Unable to authenticate the Sharepoint url from Azure function, while its works good in my local environment.
Here is the code-snippet.:
using Microsoft.SharePoint;
using Microsoft.SharePoint.Client;
using SharePointPnP;
/*
....
*/
string siteUrl = "https://abcd.sharepoint.com/xyz/abcd123";
string clientId = "aaaaa-bbbbb-ccccc-ddddd-eeeeeeeee";
string clientSecret = "lalalalalalalalalalalalalalalalalalall=";
var clientContext = new OfficeDevPnP.Core.AuthenticationManager().GetAppOnlyAuthenticatedContext(siteUrl, clientId, clientSecret);
The last line throws error..
Works good in local (.Net frame work 4.x) and but fails to authenticate in Azure function (.Net Core 2)
Is there any alternative PnP in Azure function on .Net Code2.1?
Would be great if someone throw lights on correct Assemblies to be used or some solution.
Thanks,
Venkatesh Kanale
The text was updated successfully, but these errors were encountered: