title: Import CSV data into R from Office 365
body: <p>I have CSV files in a folder on Office 365 Sharepoint that I would like to import into R. In base R I get:</p>
  
  <pre><code>&gt; test &lt;- 
  read.csv("https://MYURL/:x:/r/sites/MYSITE/Shared%20Documents/Q_10_2018.csv?
  d=w5cbc38ea43c347689ec6d59a8285d769&amp;csf=1&amp;e=tZ6Lep",header=TRUE)
  Error in file(file, "rt") : cannot open the connection
  In addition: Warning message:
  In file(file, "rt") :
    cannot open URL 
  'https://MYURL.sharepoint.com/:x:/r/sites/MYSITE/Shared%20Documents/
  Q_10_2018.csv?d=w5cbc38ea43c347689ec6d59a8285d769&amp;csf=1&amp;e=tZ6Lep': HTTP 
  status was '403 FORBIDDEN'
  </code></pre>
  
  <p>With <code>read_csv</code> I get:</p>
  
  <pre><code>&gt; test &lt;- 
  read_csv("https://MYURL/:x:/r/sites/MYSITE/Shared%20Documents/Q_10_2018.csv?
  d=w5cbc38ea43c347689ec6d59a8285d769&amp;csf=1&amp;e=tZ6Lep")
  Error in open.connection(con, "rb") : HTTP error 403.
  </code></pre>
  
  <p>I would like to offer a reproducible problem but because these are internal sites, I am not able to provide the full URL and give access to our corporate server. Also, I can't find and questions here or other documentation that tells me if this goal is even attainable. </p>
  
  <p>Does anyone have any clues? Thanks in advance.</p>