Tag Info

New answers tagged

0

The following example demonstrates how to authenticate SharePoint SOAP Services in SharePoint Online using SharePointOnlineCredentials class : public static CookieContainer GetAuthCookies(Uri webUri, string userName, string password) { var securePassword = new SecureString(); foreach (char c in password) { securePassword.AppendChar(c); } var ...


1

This is probably the classic NTLM double hop issue. Please see this other question: Password required? The remote server returned an error: (401) Unauthorized


2

The problem is the URL format that you are providing to the net use command. Take a look at the PowerShell script here http://www.lieben.nu/numb3rs/?page_id=129 which automates mapping a drive letter. You will see the format of the parameter is like this: \\domain.sharepoint.com@SSL\DavWWWRoot\sites\codesite\example\Shared Documents If you would ...


1

The following example demonstrates how to authenticate HttpClient in SharePoint Online: public class SPHttpClientHandler : HttpClientHandler { public SPHttpClientHandler(Uri webUri, string userName, string password) { CookieContainer = GetAuthCookies(webUri, userName, password); FormatType = FormatType.Json; } protected ...


0

You hardly can authenticate with X-FormDigest, even if that part is mandatory for POST methods. You really need the user token and add a Bearer Header to your HTTP request headers: { ... "Authorization": "Bearer " + UserOrAppToken ... }, If you're not able to get user token, you can use the AppOnly token with ClientID and ...



Top 50 recent answers are included