Questions tagged [python]
The python tag has no summary.
39 questions
0
votes
0
answers
7
views
Fetch values from "Person or group" using Microsoft Graph API in Python
Trying to fetch values from sharepoint list using graph API in python.
Can able to fetch all values except newly added Person or Group columns.
Can able to fetch existing Person or Group column
Can ...
0
votes
0
answers
44
views
Not getting data back via Graph when querying for drive items
I've been trying to get setup with a Python app to programmatically connect to Sharepoint and get a file. End goal is to get the contents of a file in a known location (folder) on a company Sharepoint....
0
votes
0
answers
69
views
How to connect to REST API via standard python?
I had previously been developing an app that would connect to SharePoint and allow for basic REST operations to handle org compliance. This tool used a third party library to handle this, but I was ...
0
votes
0
answers
33
views
How to update excel in SharePoint using Excel Services REST API
I could read content for the excel cells or ranges via the Excel Service REST api using GET method. Is there any way to set the content?
I tried with following url, but it only returns the updated ...
0
votes
1
answer
607
views
How to run a Python script on a SharePoint list in order to generate a PowerPoint file?
I currently have a local Python script that takes a CSV file (downloaded manually from SharePoint using the "Export as CSV" button) as input, processes the data, and generates a custom ...
0
votes
1
answer
92
views
POSTing a file to sharepoint sub-site returns a 403, while it works on the root
My python script below to upload a file (without a specific user account) to a sharepoint is working, however only when I upload to the root. When I try to use the url of a sub-site I receive a 403 ...
0
votes
1
answer
169
views
Why "target_folder.upload_file(sFilename, file_content).execute_query()" is not overwriting the existing file in SharePoint?
I have kept some files in a Share Point folder. I need to run a python script to update the files daily.
Code -
from office365.runtime.auth.authentication_context import AuthenticationContext
from ...
1
vote
0
answers
456
views
How to get all files and folders on a SharePoint site, using office 365 REST API for python?
I want to automate downloading all the documents in multiple SharePoint sites with python, so I want a way to get all folders and files in a "Shared Documents" library in SharePoint sites.
...
0
votes
2
answers
718
views
Can access web.properties but not files error - using Office365-REST-Python-Client
I'm using Office365-REST-Python-Client to access some files from Sharepoint through a Python script (using App-only method)
a code example would be this:
credentials = ClientCredential(x, y)
ctx = ...
0
votes
0
answers
2k
views
Sharepoint API using python: what is the relative path of my folders?
I'm trying to upload files automatically from a python script using the office365.sharepoint package. I can authenticat using a client id and secret (app_principal). However, when I try to get a file ...
0
votes
1
answer
1k
views
Read large lists with Office365-REST-Python-Client
I am currently trying to read only the last week's entries of a few lists, and I accomplish this by using filter("Modified gt datetime{date_in_isoformat}') or order_by("Modified desc")....
1
vote
0
answers
1k
views
Unable to post message on Teams using Microsoft Graph API
I am trying to post message on a teams channel but I am not able to do that.
I have got the required permissions also - Teamwork.Migrate.All.
The following code snippet is being used:
import requests
...
0
votes
1
answer
494
views
Can we execute a python script within SPFX webpart
I have a python script which uses some python libraries to do decrypting and encryption . Is there a way where I can invoke this script inside the webpart code.
1
vote
1
answer
3k
views
Getting -"Either scp or roles claim need to be present in the token" and Access Denied while using Graph API to upload files to SharePoint
Initially when I tried to generate the token using the URL - https://login.microsoftonline.com/tenant-id/oauth2/v2.0/token I was able to fetch the Bearer token using grant_type, client_id, scope and ...
0
votes
1
answer
1k
views
Bad Request for URL- 400
400 Client Error: Bad Request for url:
https://XXXXX.sharepoint.com/sites/QE/_api/Web/getFolderByServerRelativeUrl('Shared Documents/product-health-metrics')/Files/add(overwrite=true,url='C:/Users/...