{"id":30883117,"url":"https://github.com/jamesgrogantech/sharepoint-online-python","last_synced_at":"2025-09-08T09:04:25.181Z","repository":{"id":57466645,"uuid":"439975495","full_name":"jamesgrogantech/sharepoint-online-python","owner":"jamesgrogantech","description":"Allows users to access SharePoint List data within a locally running Python script. Supports Microsoft Active Directory SSO for SharePoint Online.","archived":false,"fork":false,"pushed_at":"2024-12-06T09:11:36.000Z","size":23,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-06T23:50:11.002Z","etag":null,"topics":["authentication","microsoft","microsoft-graph-api","oauth","pandas","python","sharepoint"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/sharepoint-online-python/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamesgrogantech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-19T21:51:07.000Z","updated_at":"2024-12-30T22:26:34.000Z","dependencies_parsed_at":"2022-09-19T11:51:08.663Z","dependency_job_id":null,"html_url":"https://github.com/jamesgrogantech/sharepoint-online-python","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jamesgrogantech/sharepoint-online-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesgrogantech%2Fsharepoint-online-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesgrogantech%2Fsharepoint-online-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesgrogantech%2Fsharepoint-online-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesgrogantech%2Fsharepoint-online-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesgrogantech","download_url":"https://codeload.github.com/jamesgrogantech/sharepoint-online-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesgrogantech%2Fsharepoint-online-python/sbom","scorecard":{"id":503804,"data":{"date":"2025-08-11","repo":{"name":"github.com/jamesgrogantech/sharepoint-online-python","commit":"109b4c8fcab2c39b5a29475e92cf83915fe60a2e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-230 / GHSA-248v-346w-9cwc","Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T22:45:32.649Z","repository_id":57466645,"created_at":"2025-08-19T22:45:32.649Z","updated_at":"2025-08-19T22:45:32.649Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274101756,"owners_count":25222446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","microsoft","microsoft-graph-api","oauth","pandas","python","sharepoint"],"created_at":"2025-09-08T09:02:57.040Z","updated_at":"2025-09-08T09:04:25.168Z","avatar_url":"https://github.com/jamesgrogantech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SharePoint Online Python\r\n\r\nCurrently Under Development, PRs are welcome.\r\n\r\nAllows users to access SharePoint List data within a locally running Python script. Supports Microsoft Active Directory SSO for SharePoint Online.\r\n\r\nWill open a new browser window -\u003e allow the user to login -\u003e then produce an access token for the local Python script to authenticate for SharePoint.\r\n\r\nThis is only suitable for python scripts running on a local machine as it requires user input to authenticate. This library is tightly integrated with Pandas to allow simple read write between a SharePoint List and a Pandas dataframe.\r\n\r\n## Setup\r\n\r\n1. Install package:\r\n\r\n   ```shell\r\n   pip install sharepoint-online-python\r\n   ```\r\n\r\n2. Import:\r\n\r\n   ```python\r\n   from sharepoint_online import SharePoint\r\n   ```\r\n\r\n## Example\r\n\r\n```python\r\nfrom dotenv import load_dotenv\r\nimport os\r\nfrom sharepoint_online import SharePoint\r\n\r\nload_dotenv()\r\n\r\n# it is advisable to load these details in from an .env file\r\nAUTH_URL = os.environ.get(\"AUTH_URL\")\r\nCLIENT_ID = os.environ.get(\"CLIENT_ID\")\r\nTOKEN_URL = os.environ.get(\"TOKEN_URL\")\r\nSITE_ID = os.environ.get(\"SITE_ID\")\r\nLIST_ID = os.environ.get(\"LIST_ID\")\r\n\r\n# initialize the SharePoint object\r\nsp = SharePoint(CLIENT_ID, AUTH_URL, TOKEN_URL, SITE_ID)\r\n\r\n# get the list as a pandas dataframe\r\nworking_df = sp.get_list_df(LIST_ID, expand=\"fields\")\r\n\r\n# reassign the title column as \"New Title\"\r\nworking_df[\"Title\"] = \"New Title\"\r\n\r\n# update the list based on the modified dataframe\r\nsp.update_rows(LIST_ID, working_df)\r\n\r\n# get the updated list as a dataframe\r\nprint(sp.get_list_df(LIST_ID, expand=\"fields\"))\r\n\r\n```\r\n\r\nThis is based on the Microsoft Graph API and the docs for the currently supported request is here:\r\nhttps://docs.microsoft.com/en-us/graph/api/list-get?view=graph-rest-1.0\u0026tabs=http\r\n\r\nIn order to use this, you must first have access to the Azure Active Directory in your tenant and have permission to create App Registrations.\r\n\r\nFollow the steps below to gain access to setup the app registration and find the necessary details:\r\n\r\n1. Create a new Active Directory app registration and get Client/Application ID from the Overview Page.\r\n2. Get Auth and Token endpoints by clicking the \"Endpoints\" button on the top bar of the Overview Page. Use the \"OAuth 2.0 authorization endpoint (v2)\" and \"OAuth 2.0 token endpoint (v2)\" urls.\r\n3. Click API Permissions -\u003e add a permission -\u003e Microsoft Graph -\u003e Delegated Permissions -\u003e Sites and select Sites.Read.All then click Add Permissions. You may need to get these permissions approved by the tenant administrator.\r\n4. Click Authentication -\u003e add a platform -\u003e Mobile and desktop applications -\u003e and enter: http://localhost:3000\r\n5. Find the site ID from this tutorial: https://www.sharepointdiary.com/2018/04/sharepoint-online-powershell-to-get-site-collection-web-id.html\r\n6. Find the list ID by going to the list sharepoint page, click the cog on the top right, then click \"List Settings\". In the URL should be a parameter List=%7B..................%7D. Copy everything between the %7B and %7D but not including.\r\n\r\n## To-do List\r\n\r\n- Add new rows to list\r\n- Add new columns\r\n- Testing\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesgrogantech%2Fsharepoint-online-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesgrogantech%2Fsharepoint-online-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesgrogantech%2Fsharepoint-online-python/lists"}