Questions tagged [python]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
15 views

Office365-REST-Python-Client copy between two sites

I am struggeling to copy a file from one sharepoint site to another. Lets say i want to copy from: https://test.sharepoint.com/Site1/A/ to : https://test.sharepoint.com/Site2/B/ i have not yet found a ...
user avatar
  • 1
0 votes
0 answers
16 views

Copy folders between SharePoint sites with Python?

I want to copy a folder and its contents from one SharePoint site to another. The folder class has a method copy_to() but as far as I can tell it can only copy to a folder within the same SharePoint ...
user avatar
  • 1
0 votes
0 answers
32 views

Trying to access a txt file on Sharepoint programmatically gives 401 Unauthorized

I am trying to write Python code to access in read-only fashion a text file that I can view via the web. I do: import getpass import requests from requests_ntlm import HttpNtlmAuth user = "...
user avatar
0 votes
2 answers
29 views

Unable to update list item using POST and REST, but able to preform other POST tasks. Using Python Requests and Sharepy

I'm able to authenticate and run GET and POST commands. But I am unable to update a list item. Or create a new list item. I'm using Python Requests and Sharepy(handles authentication). What am I ...
user avatar
0 votes
0 answers
8 views

SharePoint 2016 OOB using Python/SharePlum and Data in SQL

I am trying to import records into a SharePoint list using Python. The connection to SQL and SP is working, I am able to load records straight from SQL to SP. My only issue is... I'm trying to import ...
user avatar
0 votes
0 answers
35 views

Download file using python from sharepoint's generated link (Copy link)

I'm looking for a python way to download a SharePoint URL which looks like this: https://<tenant>.sharepoint.com/:v:/s/<site_name>/EWrCISgzqYFOj8SAHhogWCcBuKyGUDTsy6dENyFJgb_l_w?e=r8KVDN &...
user avatar
0 votes
0 answers
23 views

Sharepoint API is not returning "next" page in Programmatic access through Python

Having two Lists, Registrations (around 300 items) and Tracker (around 6500 items). There is script which successfully parses Tracker for a while now, with the following call: _api/web/Lists/...
user avatar
  • 101
0 votes
0 answers
31 views

Cannot open excel file on Sharepoint uploaded by Python

I couldn't open excel file on sharepoint(wrong file extension-> screenshot on below). I created code base on Postman API and then translated it to Python-Requests by code snippet. It is interesting ...
user avatar
1 vote
0 answers
60 views

Plotting of list data using pyscript

I have SharePoint 2013 and 2016 environments that I like to add some plots for some custom lists (webapp part) of SharePoint. I thought of using pyscript but I couldn't go too much further as I can't ...
user avatar
  • 111
0 votes
0 answers
25 views

Entries doesn't appear in SharePoint after REST Python query. (Ghost entries??)

I'm trying to append multiple entries to a SharePoint List using REST in Python, apparently it works when I get the list from Python but when I look in SharePoint the data doesn't exist in anyplace.
user avatar
0 votes
1 answer
239 views

How to exceed the Sharepoint 5000 threshold in Rest-API Python

I can't use Office365-REST-Python-Client to retrieve Sharepoint files because it's only works on Windows not on Linux - Docker (it throws error: File "/usr/local/lib/python3.8/site-packages/...
user avatar
0 votes
0 answers
99 views

Using Office365-REST-Python-Client doesnt work on an external company's sharepoint

I've written a code in python using Office365-REST-Python-Client. It works perfectly well on myCompany's sharepoint site. But in another company's sharepoint site, I am getting auth token errors. I ...
user avatar
0 votes
1 answer
36 views

Send email to users with expired documents

I want to be able to send email to each user which has expired documents and be able to know when the expiry date email was sent. The item contains worker name, their expiry date, and the heading of '...
user avatar
0 votes
1 answer
1k views

The Error validating credentials due to invalid username or password comes up when trying to upload files to SharePoint by a python script

I am trying to upload files to a SharePoint folder structure which has been already created, I have used two files for this Config_template: config = dict() config['sp_user'] = 'abs@xyz.com' config['...
user avatar
1 vote
0 answers
16 views

sharepoint power bi libraries

I published power bi reports to cloud service. Power BI reports include python codes but python path is connected to SharePoint folder. But the problem is the python libraries. How can I install ...
user avatar
0 votes
1 answer
445 views

How to update the value of a choice/multichoice column in Sharepoint online through coding

Is there a way through using a piece of code to update all the specific values of a column of SharePoint online to something else? I am looking for an equivalent of the below SQL code for Sharepoint ...
user avatar
1 vote
1 answer
119 views

How to modify the same attribute of multiple lists with exact schemas in Sharepoint online through coding or ms flow

I have several lists with the same exact schemas in SharePoint Online. How can I do the following? 1- How to add/remove a column to/from all of them? 2- How to add/remove an option to a choice/...
user avatar
0 votes
1 answer
221 views

How to grant access to App permissions?

I am trying to access the SharePoint API with Python, a part of which involves bypassing Multi Factor Authentication using an app, following the instructions here: Setting up an app-only principal ...
user avatar
0 votes
1 answer
1k views

How to move a file from one folder to another through sharepoint api in python?

I have a folder in sharepoint. I wanted to move a file from one folder to another. As per documentation, my trial was like below. headers = {"Authorization" : "Barer" + Token, ...
user avatar
0 votes
1 answer
2k views

Convert the Powershell script to Python 3

I'm trying to perform an upload files from Linux to SharePoint using Python. However, I tried a lot by googling but nothing help. At last, I got a PowerShell script that is working. So requesting help ...
user avatar
0 votes
1 answer
239 views

How to upload all files & sub directory in a directory to sharepoint

I'm writing an automation script to transfer files & subdirectory in a directory to SharePoint from ubuntu. And I'm able to transfer the files from in a directory but failed when uploading the ...
user avatar
1 vote
0 answers
208 views

Python - Not able to access company share point directory which uses single sign on for authentication

My company share point uses windows authentication and uses HTTPS I am trying to access company share point via the following code import requests from requests_kerberos import HTTPKerberosAuth, ...
user avatar
0 votes
1 answer
145 views

How to create records in Sharepoint List using Display Name of columns, in Python REST?

I am trying to create new records (rows) in a Sharepoint List using a python script. I am specifying each record as a json containing the display names of columns/fields mapped to their respective ...
user avatar
0 votes
1 answer
335 views

Excel file is not checked in after uploading to Sharepoint with Python

I have taken the following code from other post. This is very good and working fine. import requests from requests_ntlm import HttpNtlmAuth session = requests.Session() session.auth = HttpNtlmAuth('...
user avatar
  • 1
0 votes
1 answer
2k views

Python requests post JSON raw data in SharePoint

I want to update some property in a SharePoint ListItem. I'm using this code: body = '{"__metadata": {"type": "SP.Data.Documentos_x0020_compartidosItem"}, "Tarea": "TP 15"}' header = {'...
user avatar
1 vote
2 answers
2k views

How can I upload a document to a sharepoint subfolder using the REST API?

I'm using the official Office365-REST-Python-Client which basically is a wrapper to submit HTTP requests. I'm looking at the documentation and have been succesfully able to upload documents to the ...
user avatar
2 votes
1 answer
426 views

Create a document library in a sharepoint online site with python

I am trying to create a document library with a python script. I have tried doing it using Microsoft graph but I am having trouble doing with POST request and I didn't succeed. I also tried doing so ...
user avatar
0 votes
1 answer
262 views

Get the Last Modifying User of a file from the SharePoint web API

I am using python and want to make a simple request to get the last modifying user from the list of items in a document library. This is my code: import sharepy s = sharepy.connect("company....
user avatar
0 votes
1 answer
3k views

Not able to access content of sharepoint folders using shareplum [Python]

I've asked this question on stackoverflow too, here. But someone told me I'd have better luck on sharepoint stackexchange. I'm trying to download a few csv files that reside in a document thats part ...
user avatar