# Microsoft SharePoint Reader
```bash
pip install llama-index-readers-microsoft-sharepoint
```
The loader loads the files from a folder in sharepoint site.
It also supports traversing recursively through the sub-folders.
## Prequsites
### App Authentication using Microsoft Entra ID(formerly Azure AD)
1. You need to create an App Registration in Microsoft Entra ID. Refer [here](https://learn.microsoft.com/en-us/azure/healthcare-apis/register-application)
2. API Permissions for the created app.
1. Microsoft Graph --> Application Permissions --> Sites.ReadAll (**Grant Admin Consent**)
2. Microsoft Graph --> Application Permissions --> Files.ReadAll (**Grant Admin Consent**)
3. Microsoft Graph --> Application Permissions --> BrowserSiteLists.Read.All (**Grant Admin Consent**)
More info on Microsoft Graph APIs - [Refer here](https://learn.microsoft.com/en-us/graph/permissions-reference)
## Usage
To use this loader `client_id`, `client_secret` and `tenant_id` of the registered app in Microsoft Azure Portal is required.
This loader loads the files present in a specific folder in sharepoint.
If the files are present in the `Test` folder in SharePoint Site under `root` directory, then the input for the loader for `file_path` is `Test`
![FilePath](file_path_info.png)
```python
from llama_index.readers.microsoft_sharepoint import SharePointReader
loader = SharePointReader(
client_id="<Client ID of the app>",
client_secret="<Client Secret of the app>",
tenant_id="<Tenant ID of the Microsoft Azure Directory>",
)
documents = loader.load_data(
sharepoint_site_name="<Sharepoint Site Name>",
sharepoint_folder_path="<Folder Path>",
recursive=True,
)
```
The loader doesn't access other components of the `SharePoint Site`.
Raw data
{
"_id": null,
"home_page": null,
"name": "llama-index-readers-microsoft-sharepoint",
"maintainer": "arun-soliton",
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "microsoft 365, microsoft365, sharepoint",
"author": "Your Name",
"author_email": "you@example.com",
"download_url": "https://files.pythonhosted.org/packages/54/43/ec25c2a004190bbb191a8a4a082af1e84de834adaa72824333dc372b4bc5/llama_index_readers_microsoft_sharepoint-0.5.0.tar.gz",
"platform": null,
"description": "# Microsoft SharePoint Reader\n\n```bash\npip install llama-index-readers-microsoft-sharepoint\n```\n\nThe loader loads the files from a folder in sharepoint site.\n\nIt also supports traversing recursively through the sub-folders.\n\n## Prequsites\n\n### App Authentication using Microsoft Entra ID(formerly Azure AD)\n\n1. You need to create an App Registration in Microsoft Entra ID. Refer [here](https://learn.microsoft.com/en-us/azure/healthcare-apis/register-application)\n2. API Permissions for the created app.\n 1. Microsoft Graph --> Application Permissions --> Sites.ReadAll (**Grant Admin Consent**)\n 2. Microsoft Graph --> Application Permissions --> Files.ReadAll (**Grant Admin Consent**)\n 3. Microsoft Graph --> Application Permissions --> BrowserSiteLists.Read.All (**Grant Admin Consent**)\n\nMore info on Microsoft Graph APIs - [Refer here](https://learn.microsoft.com/en-us/graph/permissions-reference)\n\n## Usage\n\nTo use this loader `client_id`, `client_secret` and `tenant_id` of the registered app in Microsoft Azure Portal is required.\n\nThis loader loads the files present in a specific folder in sharepoint.\n\nIf the files are present in the `Test` folder in SharePoint Site under `root` directory, then the input for the loader for `file_path` is `Test`\n\n![FilePath](file_path_info.png)\n\n```python\nfrom llama_index.readers.microsoft_sharepoint import SharePointReader\n\nloader = SharePointReader(\n client_id=\"<Client ID of the app>\",\n client_secret=\"<Client Secret of the app>\",\n tenant_id=\"<Tenant ID of the Microsoft Azure Directory>\",\n)\n\ndocuments = loader.load_data(\n sharepoint_site_name=\"<Sharepoint Site Name>\",\n sharepoint_folder_path=\"<Folder Path>\",\n recursive=True,\n)\n```\n\nThe loader doesn't access other components of the `SharePoint Site`.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "llama-index readers microsoft_sharepoint integration",
"version": "0.5.0",
"project_urls": null,
"split_keywords": [
"microsoft 365",
" microsoft365",
" sharepoint"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b75fca5d9baf77fd25935d5ea94709d5ba1804513f2f21469fb0bb08cc54c840",
"md5": "5536f082b1eb9f8aede5d198a4f6f7a8",
"sha256": "61902a6e4f5e4e5d880a87a09009582b89c9a5370c4713172af0af529327c816"
},
"downloads": -1,
"filename": "llama_index_readers_microsoft_sharepoint-0.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5536f082b1eb9f8aede5d198a4f6f7a8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 47995,
"upload_time": "2024-11-18T01:05:45",
"upload_time_iso_8601": "2024-11-18T01:05:45.238426Z",
"url": "https://files.pythonhosted.org/packages/b7/5f/ca5d9baf77fd25935d5ea94709d5ba1804513f2f21469fb0bb08cc54c840/llama_index_readers_microsoft_sharepoint-0.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5443ec25c2a004190bbb191a8a4a082af1e84de834adaa72824333dc372b4bc5",
"md5": "32120df9fddb45bf574bb83161e28f66",
"sha256": "3863e1931392bf48d3698d7cb9fa87964f38cf26a97b10a66f688c18d298c4b7"
},
"downloads": -1,
"filename": "llama_index_readers_microsoft_sharepoint-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "32120df9fddb45bf574bb83161e28f66",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 49595,
"upload_time": "2024-11-18T01:05:47",
"upload_time_iso_8601": "2024-11-18T01:05:47.284747Z",
"url": "https://files.pythonhosted.org/packages/54/43/ec25c2a004190bbb191a8a4a082af1e84de834adaa72824333dc372b4bc5/llama_index_readers_microsoft_sharepoint-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-18 01:05:47",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-readers-microsoft-sharepoint"
}