{"id":6941,"date":"2022-12-01T22:32:34","date_gmt":"2022-12-01T13:32:34","guid":{"rendered":"https:\/\/mocabrown.com\/blog\/page-0"},"modified":"2022-12-01T22:32:34","modified_gmt":"2022-12-01T13:32:34","slug":"page-0","status":"publish","type":"page","link":"https:\/\/mocabrown.com\/blog\/page-0","title":{"rendered":"\u5148\u9032\u8a8d\u8a3c"},"content":{"rendered":"\n<p>\u3002 # Load the SharePoint Online Client Components SDK from office365.runtime.auth.authentication_context import AuthenticationContext from office365.sharepoint.client_context import ClientContext # Provide the site URL site_url = &#8216;https:\/\/&lt;your_ tenant&gt;.sharepoint.com\/sites\/&lt;your_site&gt;&#8217; # Provide credentials for the service account username = &#8216;&lt;service_account_username&gt;&#8217; password = &#8216;&lt;service_account_password&gt;&#8217; # Instantiate the authentication context and authenticate ctx_auth = AuthenticationContext(site_url) if ctx_auth.acquire_token_for_user(username, password): # Instantiate the client context and then execute the query ctx = ClientContext(site_url, ctx_auth) ctx.execute_query() # Manipulate the files<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3002 # Load the SharePoint Online Client Components SDK from office365.runtime.auth.authentication_context import [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6941","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mocabrown.com\/blog\/wp-json\/wp\/v2\/pages\/6941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mocabrown.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mocabrown.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mocabrown.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mocabrown.com\/blog\/wp-json\/wp\/v2\/comments?post=6941"}],"version-history":[{"count":0,"href":"https:\/\/mocabrown.com\/blog\/wp-json\/wp\/v2\/pages\/6941\/revisions"}],"wp:attachment":[{"href":"https:\/\/mocabrown.com\/blog\/wp-json\/wp\/v2\/media?parent=6941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}