Skip to content

v 2.3.15

Compare
Choose a tag to compare
@vgrem vgrem released this 28 Oct 17:03
· 501 commits to master since this release

Changelog

  • #569: fix for ClientRuntimeContext.execute_query_retry method by @jneuendorf
  • #584: escape password in _acquire_service_token_from_adfs-method by @chrisdecker1201
  • #568: support for passing private_key into with_client_certificate method
  • enhancements for SharePoint & OneDrive APIs

Enhancements for SharePoint & OneDrive APIs

Instantiate SharePoint client with certificate credentials

cert_path = 'selfsigncert.pem'
with open(cert_path, 'r') as f:
      private_key = open(cert_path).read()

cert_credentials = {
     'tenant': test_tenant,
     'client_id': '--client id--',
     'thumbprint': '--thumbprint--',
     'private_key': private_key
}
ctx = ClientContext(test_team_site_url).with_client_certificate(**cert_credentials)

Setting image field value

field_value = ImageFieldValue(image_url)
list_item.set_property(field_name, field_value).update().execute_query()