1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Public SiteURL As String = "https://regulation.sharepoint.com/sites/Esign"
Public folderUrl As String = "/sites/Esign/Documents%20partages"
Public SiteFolderUrl As String = "https://regulation.sharepoint.com/sites/Esign/Documents%20partages/"
Public ClientContext As SP.ClientContext = New SP.ClientContext(SiteURL)
Public oWebsite As SP.Web = ClientContext.Web
Public oFolder As SP.Folder = oWebsite.GetFolderByServerRelativeUrl(folderUrl)
Public Sub InitialisationSharepoint()
Try
ExecuteLmdMod("select * from a_parametrage")
Dim username As String = bTabl.Rows(0).Item("SmtpLogin").ToString
Dim password As String = bTabl.Rows(0).Item("SmtpPwd").ToString
password = DeCrypte(password)
Dim securedPassword As SecureString = New SecureString
For Each c As Char In password.ToCharArray()
securedPassword.AppendChar(c)
Next
ClientContext.Credentials = New SP.SharePointOnlineCredentials(username, securedPassword)
Dim library = ClientContext.Web.Lists.GetByTitle("Esign")
ClientContext.Load(library.RootFolder)
ClientContext.ExecuteQuery()
Catch
End Try
End Sub |
Partager