# Epic OP-13700 - Automatically managed project folders with SharePoint

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-13700

## Detailed specification

### Motivation and background information

### Acceptance criteria

### Out of scope

| Attribute | Value |
| --- | --- |
| Mockups |  |

## Planning

| Attribute | Value |
| --- | --- |
| Roadmap |  |
| Date |  |
| Votes |  |
| List |  |
| Target versions | 13.3.0 |
| Sprint | 13.3.0 |
| Backlog bucket |  |
| Relevance |  |

## Subitems

| ID | Type | Subject | Status | Assignee | Target versions | Project | Priority | Spent time |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| OP-13977 | Feature | Add and remove user from automatically managed folders on SharePoint/OneDrive | closed |  | 13.3.0 | OpenProject | Medium |  |
| OP-13978 | Feature | Add, remove and rename folders in SharePoint/OneDrive | closed |  | 13.3.0 | OpenProject | Medium |  |
| OP-13980 | Feature | Background cron sync job for OneDrive/SharePoint storages | closed |  | 13.3.0 | OpenProject | Medium |  |
| OP-14017 | Feature | User identifier saved in OAuthToken | closed |  | 13.3.0 | OpenProject | Medium |  |
| OP-14050 | Feature | Create/edit SharePoint/OneDrive storages for automatically managed folders | closed |  | 13.3.0 | OpenProject | Medium |  |

## Bugs and other work packages

| ID | Type | Subject | Status | Assignee | Target versions | Module |
| --- | --- | --- | --- | --- | --- | --- |
| OP-14250 | Documentation | Update admin guide for identifying OneDrive/SharePoint drive ID | closed |  | 13.3.0 |  |
| OP-14016 | Task | Clarify UI strategy with product team | closed |  | 13.3.0 |  |
| OP-13976 | Task | Map existing permission with limited SharePoint permissions | closed | Marcello Rocha Pereira | 13.3.0 |  |
| OP-13975 | Task | Investigate restoring deleted folders | closed | Andreas Pfohl | 13.3.0 |  |
| OP-13949 | Task | Explore using Sharing Permissions as a path for AMPF | closed | Marcello Rocha Pereira | 13.3.0 |  |
| OP-13884 | Task | Investigate Permission handling over Sharepoint/OneDrive API | closed | Marcello Rocha Pereira | 13.3.0 |  |
| OP-13875 | Task | Document "Server Side" authentication over MS Graph API | closed | Marcello Rocha Pereira | 13.3.0 |  |
| OP-14018 | Task | Admin needs explanation on permissions as SharePoint only has read or everything | rejected |  | 13.3.0 |  |

## Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Enterprise plan |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Designer | Marc Alcobé |
| Developers | OP Dev Titan Team |
| Requested by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| Work |  |

## Description

## Problem

When organizations structure work in projects they usually have files that belong to that project.

*   Many of these files have a longer life cycle as work packages and are relevant to many work packages.
*   Some files are relevant to the project but are not linked to any specific work package.

_**Example:** One task could be to sketch a draft and the next task could be to finalize the document. That would make two work packages for one document. After the document is finalized and the last work package is closed, you still want to know where the document is stored, no matter if the project simply continues or even gets archived._

The challenge of this EPIC is to allow all project members access to that shared project folder so that everybody has permissions to either read, create, write, delete or share all files in that folder. Having the permissions managed by OpenProject automatically will boost the productivity and acceptance in the project team. No tedious manual sharing is necessary.

## Current work around

Currently some organizations use the OpenProject module _Documents_ to share files with team members. However, that module lacks usability in many ways:

*   Files uploaded to that module are not synced with a Desktop, as it lacks WebDAV etc.
*   This leads to the inconvenience that uploading of files needs to be done one by one instead of complete folders.
*   Referencing those files from within work packages (as &quot;inputs&quot; or &quot;outputs&quot; of a task) with normal HTML links is a tedious and error prone process. It is not efficiently supported.

Working with the _Documents_ module is OK, when you only want to share a couple of documents that you rarely update. Real work on those files is not practical.

## Proposed Solution

In OpenProject we allow project admins to create for each project a shared folder within a dedicated _Document Library_ in a dedicated _SharePoint Site_.

The OpenProject project menu will have a menu item per connected _SharePoint Document Library_. Clicking that menu item the user leaves OpenProject and will directly open the shared project folder in the web interface of _SharePoint_.

Every time memberships of a OpenProject project change, the system needs to provide a way to ensure correct permission for the project folder inside the storage:

1.  Add permissions for new memberships
2.  Remove permissions when memberships are removed

#### Reuse of existing file sharing permissions per project

The existing permission per role and project will be respected:

*   Read files
*   Write files
*   Create files
*   Delete files
*   Share files

Note: SharePoint has only following permission

*   Read files
*   Write files

#### Fixing/re-syncing sharing permissions per project

OpenProject and _SharePoint_ are two independent systems. Network communication between the two can fail for a multitude of reasons. Therefore it is crucial that failed request for setting permissions will be regularly retried.

  

**Note to developers: All features should be behind a feature flag.**
