Advertisement
Guest User

Untitled

a guest
Apr 7th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. ClientContext context = new ClientContext(siteUrl);
  2. Authenticator at = new Authenticator();
  3. at.UserName = Login;
  4. at.Password = password;
  5. at.AuthenticationMode = ClientAuthenticationMode.MicrosoftOnline;
  6. at.CookieCachingEnabled = true;
  7.  
  8. SetAdfsSettings(at);
  9. //at.FederationPassiveAuthUri = "urn:oasis:names:tc:SAML:2.0:ac:classes:Password";
  10.  
  11. context.Credentials = at;
  12. List photos= context.Web.Lists.GetByTitle("Photos");
  13.  
  14. ClientContext context = new ClientContext(siteUrl);
  15. Authenticator at = new Authenticator();
  16. at.UserName = Login;
  17. at.Password = password;
  18. at.AuthenticationMode = ClientAuthenticationMode.MicrosoftOnline;
  19. at.CookieCachingEnabled = true;
  20.  
  21. // SetAdfsSettings(at);
  22. at.FederationPassiveAuthUri = "urn:oasis:names:tc:SAML:2.0:ac:classes:Password";
  23. at.NavigateBackAfterAuthentication = true;
  24. at.AllowSmartRouting = true;
  25. at.PromptOnFailure = true;
  26. at.UagServerUrl = new Uri("https://adfs.jolera.com/adfs/ls/");
  27.  
  28. context.Credentials = at;
  29. List photos= context.Web.Lists.GetByTitle("Photos");
  30. UploadDocument(photos, siteUrl, "Photos/", "photo.jpg", photo);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement