Office 365 & Microsoft Graph library for Python.
Questions tagged [office365-rest-client]
33 questions
0
votes
0 answers
I need to use MSAL for sharepoint authentication and ctx for retrieving data from a folder inside SharePoint using python
I need to use MSAL for SharePoint authentication and ctx for retrieving data from a folder inside SharePoint using python. Azure AD is already setup . I have used the below code for msal authentication and I am able to retrieve the access token…
0
votes
1 answer
I can't get the folders from my sharepoint site, how can i resolve this?
I'm currently using a python program to convert documents to store in a databse. For this I need to access sharepoint sites and download the neccesary files.
I've been using multiple tutorials and examples dealing with the office365 REST py library…

Bruno Seriese
- 27
- 1
- 7
0
votes
1 answer
Cannot "Add" List Item to SharePoint List using shareplum
I am trying to update a Sharepoint list using shareplum. I am able to read information but for some reason I am not able to add a new list item. What is going wrong here?
from shareplum import Site
from requests_ntlm import HttpNtlmAuth
#…

ai88
- 33
- 4
0
votes
0 answers
How to download xlsx file from office365 with python
i am trying to download an xlsx file from sharepoint but still getting an error that the url for the file is not valid
i get the url form here
but i get this error:
office365.runtime.client_request_exception.ClientRequestException: ('-2130575338,…

muhammed hilal
- 91
- 6
0
votes
1 answer
Unable to render aspx files when uploaded to SharePoint programmatically
I am new to SharePoint. I have written a simple python script that basically connects to SharePoint and uploads files (aspx and other frontend files) from a folder on my local machine to a specific folder on SharePoint site.
To facilitate the script…

Sai Anirudh Sripati
- 21
- 3
0
votes
1 answer
Upload file created in temporary directory into SharePoint using python
I am trying to upload a temp XML file that I created into Sharepoint using Python Script. Though I don't see any error when I run the code however the file was not uploaded into Sharepoint folder. Can you help me out.
# create XML attachment as temp…

Rupesh
- 5
- 2
0
votes
0 answers
SharePoint programmatic reading of list returns items on some lists but not on others on the same site
I have a question around the topic of reading SharePoint lists programmatically.
The code I've written is using app level authentication.
I am able to read items from some lists of the same SharePoint site but not others.
I think there's an issue…

Engineering Student
- 11
- 4
0
votes
0 answers
How can I fix the error: 'an existing connection was forcibly closed'. (Office 365 REST Python client)
I recently created a solution to automate some copy-pasting of Excel files between SharePoint folders.
To establish the connection to SharePoint, I use the Office 365 REST Python client.
As an authentication method, I use clientcredentials (this…

AntnDhg
- 1
- 1
0
votes
1 answer
Office365-REST-Python-Client - How to read more than 100 rows from a Sharepoint (MS-List)
I'm using the following Python (v3.8.10) code with the latest version of the Office365-REST-Python-Client to access an MS-List on my Sharepoint site:
sp_lists = ctx.web.lists
s_list = sp_lists.get_by_title(staff_list)
l_items =…

Bob Fishcake
- 1
- 1
0
votes
0 answers
API Rest Sharepoint with SharePlum
I have some problems with the access to the Rest_API Sharepoint (Python)
I'm using Shareplum library but I have an issue about the authenticacion oficce 365.
Could you help me with that problem?.
Thanks in advance!!
Code:
from shareplum import…

Cristian
- 1
0
votes
1 answer
Office365 management API - Unable to subscribe
I want to capture the file operation events in OneDrive. So I created a tenant in azure and attached an App with it. I provided the necessary permissions to the app.
I am able to get the access token using the client key, secret created in…

Durgesh O Mishra
- 51
- 1
- 2
- 8
0
votes
1 answer
Why is my code to download files producing a 404 error?
I have created an app, generated client credentials, and trusted the app for my SharePoint online site.
I have created a file test.txt and it is placed under…

Pro
- 305
- 3
- 13
0
votes
0 answers
How to retrieve office 365 mailbox IDs using Invoke-RestMethod step by step
I'm developing a simple PowerShell script to retrieve office365 user mailbox folder IDs, my code fails at authentication stage displaying error 401 unauthorized. Is there a step that is missing so as to connect to office 365 mailbox using the…

Bernietechy
- 186
- 1
- 16
0
votes
1 answer
Uploading files of different sizes on sharepoint office365 REST Python Client
I want to upload some files to sharepoint via office365 REST Python client.
On documentation on github, I found two examples:
one for larger files where this is executed:
uploaded_file = target_folder.files.create_upload_session(local_path,…

Sara Chaoufi
- 19
- 3
0
votes
1 answer
How do I specify a list of fields in a ListCreationInformation object, when using Office365-REST-Python-Client to create a SharePoint List?
I want to create a new list with the same fields as an existing list.
I can get the fields for the existing list, and I have found a number of examples of creating a list with this library:
from an XML schema
from a List Template
from built-in…

scign
- 812
- 5
- 15