Questions tagged [office365-rest-client]

Office 365 & Microsoft Graph library for Python.

33 questions
4
votes
1 answer

Microsoft Graph: How to report phishing to tenant admin

I would like to use the Microsoft Graph to report suspicious emails on behalf of a user. Precisely, the reports should end up in the User reported messages view in Microsoft Defender. I know I can create Threat Assessment Request, but that sends the…
3
votes
1 answer

How to upload multiple items in a list in Sharepoint Online using python office 365 rest

I have a list in sharepoint online: ListA This list has 13 items. I want to add more ,let's say 3 more. I also have a dataframe with 3 columns: Title, Scientist, ID I would like to create multiple new items, one for each row, and upload them into…
Vyron B.
  • 35
  • 3
  • 7
2
votes
0 answers

Is there a way to provide content-type to python sharepoint add_item method?

My objective is to read a csv file using pandas and add records to sharepoint list (Mahesh_Demo) in truncate-load fashion. My initial Sample code worked Working/Sample Code from office365.runtime.auth.authentication_context import…
2
votes
0 answers

How to programmatically access Sharepoint sites other than root from Office365-REST-Python-Client?

I need to programmatically access my organization's Office 365 Sharepoint. In particular, at the moment I need to be able to upload and download files from specific lists/paths. I created an Azure AD application using this manual and granted…
2
votes
1 answer

Listing files and folder in Sharepoint with Office365-REST-Python-Client responds : 404 not found error

I am trying to list files from a folder. It works with folder name with spaces but doesn't work when folder name contains '#'. I am getting below error office365.runtime.client_request_exception.ClientRequestException: ('-1234456,…
2
votes
1 answer

Databricks notebook command skipped only when scheduled as a job

I have a databricks notebook with some code (Python) to upload a file from dbfs to a SharePoint location. The notebook runs correctly when executed stand-alone, and the file is uploaded, but when I try to schedule it using ADF or a Databricks job,…
2
votes
1 answer

Office365-REST-Python-Client Connected but no items showing

I'm trying to access sharepoint with Office365-Rest. I'm using the app connection process described here: https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs I set permissions to
1
vote
0 answers

Avoid shared lock when using Office365-REST-Python-Client-2.3.16

I am trying to update a file on sharepoint using Office365-REST-Python-Client-2.3.16. But if I open this file in a browser, I will always get: office365.runtime.client_request_exception.ClientRequestException: ('-2147018894,…
Ardar
  • 61
  • 1
  • 4
1
vote
0 answers

How to access company's SharePoint using Python from Linux which is in production (offline environment)?

I am try to establish to my company's SharePoint site from Linux which is in production environment (offline). I also used proxies but failed to establish the connection. I was successful in Windows which is connected to internet. Code: from…
1
vote
1 answer

Import error: cannot import name 'ClientCredential' from 'office365.sharepoint.client_context'

I encountered this error in Python. When import office365.sharepoint.client_context, there is no error. But when doing from office365.sharepoint.client_context import ClientCredential, the error showed: Import error: cannot import name…
Daisy Miao
  • 11
  • 1
1
vote
1 answer

Office365-REST-Python-Client seems unable to update Lookup Columns in Sharepoint

I managed to follow another users question about uploading files and set metadata here :- Office365-REST-Python-Client 401 on File Update And I am now able to do what it says on the tin and upload files and set metadata. However I'm struggling when…
Simon
  • 97
  • 3
  • 13
1
vote
1 answer

How to copy folder and its content into new location in SharePoint Online with python office365 module

I am trying to copy a folder with all its content from one site to another in SharePoint Online. So I created a code that recursively creates the folder structure. What I can't do is to copy the files. For the start I am trying to test the…
Ani
  • 159
  • 7
1
vote
1 answer

Upload file to a subfolder in Sharepoint with office365 API

I am trying to upload a file to sharepoint folder. I got the following code working that just uploads the files to the root documents directory. But I want it to upload to a specific directory in the sharepoint. Variables: fullurl =…
0
votes
1 answer

NoneType object has no attribute json - Office365 file upload using Python

I am trying to use the Office365-REST module to upload a file to Sharepoint. from office365.runtime.auth.authentication_context import AuthenticationContext from office365.sharepoint.client_context import ClientContext from…
evv_gis
  • 104
  • 5
  • 18
0
votes
0 answers

Not able to upload file to sharepoint using python office365-REST-Python-Client python package

I have files in one in one of the path and wants to upload that into sharepoint folder but getting below error with multiple "another exception occurred". Traceback (most recent call last): File…
1
2 3