https://github.com/yuu-eguci/sharepointmaid
A repository to access files on SharePoint site using Graph API, SharePoint REST API v2, by Python.
https://github.com/yuu-eguci/sharepointmaid
github-actions graph-api openpyxl python sharepoint-online slack-webhook
Last synced: 6 months ago
JSON representation
A repository to access files on SharePoint site using Graph API, SharePoint REST API v2, by Python.
- Host: GitHub
- URL: https://github.com/yuu-eguci/sharepointmaid
- Owner: yuu-eguci
- Created: 2020-12-16T07:31:52.000Z (almost 5 years ago)
- Default Branch: dev
- Last Pushed: 2021-05-11T09:09:33.000Z (over 4 years ago)
- Last Synced: 2023-03-03T13:12:38.317Z (over 2 years ago)
- Topics: github-actions, graph-api, openpyxl, python, sharepoint-online, slack-webhook
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
SharePointMaid
===A repository to access files on SharePoint site using Graph API, SharePoint REST API v2, by Python.

## Ref urls
- [SharePoint APIs](https://docs.microsoft.com/ja-jp/sharepoint/dev/sp-add-ins/sharepoint-net-server-csom-jsom-and-rest-api-index)
- [Graph REST API v1.0](https://docs.microsoft.com/ja-jp/graph/api/overview?view=graph-rest-1.0) what this repository uses
- [Graph Explorer](https://developer.microsoft.com/ja-jp/graph/graph-explorer) what allows Graph API emurations## Run on local env
Create .env
```
TENANT_ID=***
CLIENT_ID=***
CLIENT_SECRET=***
USER_OBJECT_ID=***
TARGET_SITE_ID=***
TARGET_FILE_PATH=***
```## Set up Azure Active Directory application
- Make sure you have the Global administrator role.
- Go to Azure Active Directory.
- Left pane, App registrations > New registration
- Left pane, API permissions > Add permission
- Select permission User > User.ReadWriteAll and Sites > Sites.ReadWriteAll
- Push Grant admin consent for TENANT_NAME button
- Left pane, Certificates & secrets > + New client secretNow you have...
- TENANT_ID
- CLIENT_ID
- CLIENT_SECRETwhat you have to register as environment variables.