We have now constructed a desktop app that import/exports SharePoint lists into/from Workplace 365 websites.
The app works completely, and we have been in a position to do the import/export of Workplace 365 web site pages for a lot of purchasers to date.
however on a selected web site, when I attempt to import some pages, I get the next error:
System.Internet.WebException: The distant server returned an error: (403) Forbidden. at System.Internet.HttpWebRequest.GetResponse() at Microsoft.SharePoint.Consumer.Idcrl.SharePointOnlineAuthenticationProvider.GetCookie(Uri url, String endpoint, String ticket) at Microsoft.SharePoint.Consumer.Idcrl.SharePointOnlineAuthenticationProvider.GetAuthenticationCookie(Uri url, String username, SecureString password) at Microsoft.SharePoint.Consumer.SharePointOnlineCredentials.GetAuthenticationCookie(Uri url, Boolean refresh) at Microsoft.SharePoint.Consumer.ClientRuntimeContext.SetupRequestCredential(ClientRuntimeContext context, HttpWebRequest request) at Microsoft.SharePoint.Consumer.SPWebRequestExecutor.GetRequestStream() at Microsoft.SharePoint.Consumer.ClientContext.GetFormDigestInfoPrivate() at Microsoft.SharePoint.Consumer.ClientContext.EnsureFormDigest() at Microsoft.SharePoint.Consumer.ClientContext.ExecuteQuery()
Word that the account used for the authentication, has a Full Management permission on the location ( I can create sub-sites, lists, …and so forth if logged in via an online browser )
I’ve additionally checked this reply, and we’re already utilizing
SharePointOnlineCredentials for authentication ( you possibly can see that from the stack hint above )
So what’s stopping me from doing the import via our desktop App ?
Word: I didn’t paste any code because the app is already battle
examined and labored so many instances earlier than, and I do consider that the
case right here is a few type of settings on the consumer’s web site.
After some investigation, and because of @Evariste,
Evidently authentication is failing this time as a result of the location isn’t utilizing the traditional Workplace 365 authentication mannequin, and as a substitute they’re utilizing the