I am developing a Visual Basic web application, and i have managed to successfully get the authentication part done. The code i have as of now:
<STAThread()> Public Sub getAuthentication() Using ctx As ClientContext = ClaimClientContext.GetAuthenticatedContext("https://sample.sharepoint.com") If ctx IsNot Nothing Then 'able to remote login Dim web As Web = ctx.Web ctx.Load(ctx.Web) ctx.ExecuteQuery() Dim siteUrl As String = "https://sample.sharepoint.com/teams/collabs/SupplierManagement/database/Americas%20WIKI/Home.aspx" Dim clientContext1 As New ClientContext(siteUrl) Dim oWebsite As Web = clientContext1.Web Dim collList As ListCollection = oWebsite.Lists clientContext1.Load(collList) clientContext1.ExecuteQuery() End If End Using End Sub
But it throws Error 403 at the line of code below, which means i am not authenticated. Can anyone please help? I have been stuck for days now, and i am new to this.