OneDrive integration#
Microsoft Graph REST API based integration. (Link

CrushFTP supports both OneDrive Personal (Designed for individual users to store personal files, photos, and documents.) and OneDrive for Business (Link

!!! 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
Start at the Microsoft Azure Portal: Link

Application registration: Navigate to App registrations in the Azure Portal. Click on New registration to create a new application.

The Redirect URL must end with "register_microsoft_graph_api/".
http://localhost:9090/register_microsoft_graph_api/
or
https://your.crushftp.domain.com/register_microsoft_graph_api/
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!


1. OneDrive Business Type
#
About Microsoft Graph Permission see more details at Link


!!!Grant Admin consent for the newly added permission.

Client Id : You can find it at Azure portal -> App Registration -> Overview: Application (client) ID)

OneDrive remote item settings:
Username: It must start with app_permission, followed by the Client ID(Azure portal -> App Registration -> Overview: Application (client) ID)), separated by a tilde (~).
app_permission~<<Client ID>>
Password: Client Secret.
Tennant: The tenant id.
User id or User principal name: Provide the user's Id or the user's principal name.

2 Ondrive Personal Type
#
!!!Constraint: Microsoft Graph REST API does not support stream upload. In order to integrate with CrushFTP the files are temporarily stored as a local file (CrushFTP install folder/onedrive/) during the upload. It has a 10 MB upload limit.
About Microsoft Graph Permission see more details at https://learn.microsoft.com/en-us/graph/permissions-overview?tabs=http



Client id : You can find it at Azure portal -> App Registration -> Overview:

OneDrive remote item settings:
!!! The CrushFTP admin page URL must match the redirect URL. In our example: http://localhost:9090
Select the OneDrive item type and click on the "Get Refresh Token" button. Provide the Client ID, Client Secret, and Tenant. Tenant: See your App registration -> Overview -> EndPoints. Based on the App Registration Account type it can be an id, common, or consumer.

Click on the "OK" button, log in with your Azure credentials, and allow CrushFTP to have access to your OneDrive files. After that the form will disappear and the username and password will be filled. Done.

Add new attachment
Only authorized users are allowed to upload new attachments.
List of attachments
Kind | Attachment Name | Size | Version | Date Modified | Author | Change note |
---|---|---|---|---|---|---|
png |
client_id.png | 93.9 kB | 1 | 05-Dec-2023 05:32 | krivacsz | |
png |
ms_graph_app_permission.png | 81.4 kB | 1 | 05-Dec-2023 05:32 | krivacsz | |
png |
ms_graph_delegated.png | 107.3 kB | 1 | 05-Dec-2023 05:32 | krivacsz | |
png |
new_registration.png | 81.9 kB | 3 | 05-Dec-2023 05:32 | krivacsz | |
png |
new_secret.png | 81.9 kB | 2 | 05-Dec-2023 05:32 | krivacsz | |
png |
permission_final.png | 165.2 kB | 1 | 05-Dec-2023 05:32 | krivacsz | |
png |
permission_microsoft_graph.png | 182.9 kB | 2 | 05-Dec-2023 05:32 | krivacsz | |
png |
register_app.png | 230.6 kB | 2 | 05-Dec-2023 05:32 | krivacsz | |
png |
remote_item_app_permission.png | 101.1 kB | 1 | 05-Dec-2023 05:32 | krivacsz | |
png |
remote_item_done.png | 193.7 kB | 1 | 05-Dec-2023 05:32 | krivacsz | |
png |
remote_item_settings.png | 176.3 kB | 1 | 05-Dec-2023 05:32 | krivacsz | |
png |
secret_value.png | 42.7 kB | 1 | 05-Dec-2023 05:32 | krivacsz |
«
This particular version was published on 02-May-2025 10:58 by krivacsz.
G’day (anonymous guest)
Log in
JSPWiki