title: Access Office365 SharePoint with Single Sign-On via Python
body: <p>I don't know much of anything about SharePoint, but was tasked to use Python to download a SharePoint list.  SharePoint is Office365 and is accessed with Single Sign-on.  I found the below sample on how to connect to SharePoint:</p>
  <pre><code>from office365.runtime.auth.user_credential import UserCredential
  from office365.sharepoint.client_context import ClientContext
  ctx = ClientContext('https://&lt;site&gt;.sharepoint.com').with_credentials(UserCredential('domain\\user', 'password'))
  web = ctx.web
  ctx.load(web)
  ctx.execute_query()
  print(web.properties[&quot;Url&quot;])
  </code></pre>
  <p>When executing this code I receive the following error:</p>
  <pre><code>Cannot get binary security token for from https://login.microsoftonline.com/extSTS.srf
  KeyError: 'FedAuth'
  </code></pre>
  <p>Can anyone point me in the right direction?</p>