At line 2 removed one line |
__Remote item name:__ Sharepoint\\ |
At line 4 changed 2 lines |
__!!!Constraint:__ Microsoft Graph REST API does not support stream upload. In order to integrate with CrushFTP the files are temporarily stored as local files (CrushFTP install folder/sharepoint/) during the upload.\\ |
__Proxy__: If your server's internet connection uses a proxy server. You need to whitelist domains: login.microsoftonline.com, graph.microsoft.com\\ |
More info about Microsft Graph REST API: [https://learn.microsoft.com/en-us/graph/api/resources/onedrive?view=graph-rest-1.0}]\\ |
At line 7 changed one line |
Go to the Microsoft Azure portal: [https://azure.microsoft.com/en-us/features/azure-portal]/\\ |
Remote item name: __Sharepoint__\\ |
At line 9 changed one line |
__Application registration: __Go to the App registrations and click on New registration:\\ |
__!!! Proxy Configuration:__ If your server accesses the internet through a proxy, make sure to whitelist the following domains to allow authentication and Microsoft Graph API access:\\ |
• login.microsoftonline.com\\ |
• graph.microsoft.com\\ |
At line 11 changed one line |
[attachments|new_registration.png]\\ |
Open the Microsoft Azure Portal: [https://azure.microsoft.com/en-us/features/azure-portal]/\\ |
At line 13 changed one line |
Name it. Select the Multitenant and personal Microsoft accounts type. The redirect URL must end with register_microsoft_graph_api/. Then click on register.\\ |
__Application registration:__ Navigate to App registrations in the Azure Portal. Click on "New registration" to create a new application.\\ |
At line 15 changed one line |
[attachments|register_app.png]\\ |
[attachments|new_registration.png]\\ |
At line 17 changed one line |
Under the redirect URL enable the __Access Token__ to be issued by the authorization endpoint:\\ |
The Redirect URL must end with __"register_microsoft_graph_api/"__.\\ |
At line 19 changed one line |
[attachments|SMTP Microsoft Graph XOAUTH 2 Integration/enable_access_token.png]\\ |
{{{ |
|
http://localhost:9090/register_microsoft_graph_api/ |
|
}}} |
or |
{{{ |
|
https://your.crushftp.domain.com/register_microsoft_graph_api/ |
|
}}} |
At line 21 changed one line |
__API permission:__ You must also provide permission for the Microsoft Graph. Go to the Api permission. Click on Add Permission, and select Microsoft Graph. |
__Configure API permission:__ You must also grant permissions for Microsoft Graph. Go to the __API Permissions__ section, click Add a permission, and select __Microsoft Graph__. To learn more about Microsoft Graph permissions—including the difference between __Application__ and __Delegated__ permissions—refer to the official documentation: [https://learn.microsoft.com/en-us/graph/permissions-overview?tabs=http]\\ |
At line 25 changed one line |
It permits a Server to __server-to-server__ authentication. Add __Files.REadWriteAll__ permission. And Grant Admin consent on the added permission.\\ |
Application permissions are used when an application runs without a signed-in user, such as in server-to-server connections.\\ |
At line 27 changed one line |
[OneDriveSetup/ms_graph_app_permission.png]\\ |
__a.) Files.ReadWrite.All__: Grants the application read and write access to all files the signed-in user can access, across all user drives and document libraries (including SharePoint sites and OneDrive for Business).\\ |
This includes the ability to:\\ |
• List, read, update, create, and delete files and folders\\ |
• Upload/download documents\\ |
• Modify file metadata\\ |
At line 43 added 21 lines |
__Configure API Permission__: Navigate to API Permissions. Click on Add a permission button. Select __Microsoft Graph__. Then select __Application Permission__. Search for __Files__ and check the flag Files.ReadWrite.All permission.\\ |
\\ |
[SharePoint Integration/ms_graph_app_permission.png]\\ |
\\ |
__b.) Sites.FullControl.All__: Grants the application full control over all site collections in the tenant without user interaction. ( More info -> [https://learn.microsoft.com/en-us/graph/permissions-reference#sites-permissions])\\ |
\\ |
This permission allows the app to:\\ |
• Read and write all files in all SharePoint Online site collections\\ |
• Manage lists, document libraries, subsites, and site permissions\\ |
• Perform site-level actions across the entire tenant\\ |
\\ |
__Configure API Permission__: Navigate to API Permissions. Click on Add a permission button. Select __Microsoft Graph__. Then select __Application Permission__. Search for __Sites__ and check the flag Sites.FullControl.All permission.\\ |
\\ |
__c.) Sites.Selected__: Grants the application no access to SharePoint sites by default. However, you can explicitly grant access to specific sites by using the Microsoft Graph API. More information is available at the following link: [Managing SharePoint Site Access for Applications Using Sites.Selected Permission|CrushTaskExample19].\\ |
\\ |
__Configure API Permission__: Navigate to API Permissions. Click on Add a permission button. Select __Microsoft Graph__. Then select __Application Permission__. Search for __Sites__ and check the flag Sites.Selected permission.\\ |
\\ |
[CrushTaskExample19/site_selected_microsoft_graph.png]\\ |
\\ |
Grant __Admin consent__ for the newly added permission.\\ |
\\ |
At line 31 changed one line |
__Client id : __ You can find it at Azure portal -> App Registration -> Overview:\\ |
__Client id__: See at App Registration -> Overview -> Application (client) ID\\ |
At line 35 changed one line |
__Secret key:__ A new client secret needs to be created as well. Go to the "Certificate & secrets" and generate a new secret key. Click on New client secret.\\ |
__Secret key__: A new client secret must be created. Go to Certificates & secrets, and generate a new client secret by clicking on New client secret. Ensure you copy over the __value__ immediately!\\ |
At line 41 changed one line |
__Authentication related settings:__\\ |
__Sharepoint VFS item configuration:__\\ |
At line 43 changed 6 lines |
__User name:__ Itt must start with "app_permission", then the Client ID separated with tilda.\\ |
{{{ |
app_permission~<<Client ID>> |
}}}\\ |
__Password:__ Client Secret.\\ |
__Tennant:__ The tenant id.\\ |
Select the __Application Permission__ radio button, then click __Application Permission__. Enter the __Client ID__, __Client Secret__, and __Tenant ID__, then click OK. This will automatically configure the username and password in the VFS item settings. After that, proceed with the SharePoint site-specific configuration.\\ |
At line 50 changed one line |
!!!1.2 Delegated permission:\\ |
__Tennant:__ The tenant id. Tenant: See your App registration -> Overview -> EndPoints. Based on the App Registration Account type it can be an ID, common, or consumer.\\ |
Provide the SharePoint-specific settings. See under the __1.3.Sharepoint-specific settings.__ ( Link: [https://www.crushftp.com/crush10wiki/Wiki.jsp?page=SharePoint%20Integration#section-SharePoint+Integration-1.3.SharepointSpecificSettings]\\ |
At line 83 added 28 lines |
[attachments|app_permission_vfs_item.png]\\ |
\\ |
!!!1.2 Delegated Permission:\\ |
\\ |
Delegated permissions are used when an application makes API calls as the signed-in user. The app is delegated the user’s permissions and can only access resources that the user is authorized to access.\\ |
\\ |
__a.) Files.ReadWrite.All__: Grants the application read and write access to all files the signed-in user can access, across all user drives and document libraries (including SharePoint sites and OneDrive for Business).\\ |
This includes the ability to:\\ |
• List, read, update, create, and delete files and folders\\ |
• Upload/download documents\\ |
• Modify file metadata\\ |
\\ |
__Configure API Permission__: Navigate to API Permissions. Click on Add a permission button. Select __Microsoft Graph__. Then select __Delegated Permission__. Search for __Files__ and check the flag Files.ReadWrite.All permission.\\ |
\\ |
__b.) Sites.FullControl.All__: Grants the application full control over all site collections in the tenant without user interaction. ( More info -> [https://learn.microsoft.com/en-us/graph/permissions-reference#sites-permissions])\\ |
\\ |
This permission allows the app to:\\ |
• Read and write all files in all SharePoint Online site collections\\ |
• Manage lists, document libraries, subsites, and site permissions\\ |
• Perform site-level actions across the entire tenant\\ |
\\ |
__Configure API Permission__: Navigate to API Permissions. Click on Add a permission button. Select __Microsoft Graph__. Then select __Delegated Permission__. Search for __Sites__ and check the flag Sites.FullControl.All permission.\\ |
\\ |
__c.) Sites.Selected__: Grants the application no access to SharePoint sites by default. However, you can explicitly grant access to specific sites by using the Microsoft Graph API. More information is available at the following link:[Managing SharePoint Site Access for Applications Using Sites.Selected Permission|CrushTaskExample19].\\ |
\\ |
__Configure API Permission__: Navigate to API Permissions. Click on Add a permission button. Select __Microsoft Graph__. Then select __Delegated Permission__. Search for __Sites__ and check the flag Sites.Selected permission.\\ |
\\ |
\\ |
At line 114 added 4 lines |
Grant __Admin consent__ for the newly added permission.\\ |
\\ |
[attachments|app_permission_admin_consent.png]\\ |
\\ |
At line 67 changed one line |
__!!! The CrushFTP admin page URL must match the redirect URL.__ In our example : http://localhost:9090\\ |
__!!! The CrushFTP admin page URL must match the redirect URL.__ In our example, it was: http://localhost:9090 or https://your.crushftp.domain.com/register_microsoft_graph_api/\\ |
At line 77 changed one line |
!!!1.3.Sharepoint specific settings:__\\ |
!!!1.3.Sharepoint-specific settings:__\\ |
At line 82 changed one line |
__Site Path__: The path of the SharePoint site. It should start and end with slash.\\ |
__Site Path__: The path of the SharePoint site. It should start and end with a slash.\\ |
At line 94 changed one line |
__!!!Constraint:__ On newer Sharepoint (after 2019) Grant App permission is disabled by default. To enable Custom Application APP Authentication run the following PowerShell commands:\\ |
__!!!Constraint:__ On newer Sharepoint (after 2019) Grant App permission as it is disabled by default. To enable Custom Application APP Authentication run the following PowerShell commands:\\ |
At line 115 changed one line |
__Advantage(Compared with MSGraph API)__: Stream upload supported. There is no temporarily stored local file during the upload.\\ |
__Advantage(Compared with MSGraph API Delegated Permission)__: Stream upload supported. There is no temporarily stored local file during the upload.\\ |