Setup Microsoft OneDrive
13 min
overview microsoft onedrive is an enterprise grade cloud storage solution that enables businesses to securely store, manage, and share files across all devices integrating onedrive with our solution allows end customers to upload large print ready files directly into their onedrive storage purpose this integration is designed to provide a seamless and secure file upload experience by allowing customers to connect their onedrive accounts directly with the platform it helps streamline the process of handling large print ready files, reduces dependency on local storage, and improves overall workflow efficiency for both customers and print businesses how to integrate read the below systematic guide to integrate microsoft onedrive into your website register an application in microsoft entra id the first step is to register your application in microsoft entra id (formerly azure active directory) this creates the identity your app uses to authenticate with microsoft services, including onedrive open a browser and go to the microsoft entra https //entra microsoft com/ log in with your microsoft organizational or personal account after login, locate app registrations directly in the left sidebar menu click on app registrations click the + new registration button at the top of the page fill in the registration form using the details below name enter a display name for your application (e g , onprintshop onedrive) supported account types any entra id tenant + personal microsoft account redirect uri (optional) leave blank for now as it will be configured in later steps click the register button to create the application you will be redirected to the app's overview page copy and save the application (client) id note the application (client) id is the unique identifier for your registered app keep it in a safe, accessible location generate client secret a client secret acts as a password for your application to authenticate securely with microsoft it is used alongside the client id to connect onedrive to onprintshop in your registered app, click certificates & secrets from the left sidebar move to the client secret tab and click + new client secret fill in the dialog description enter a meaningful name (e g , onprintshop secret) expires choose an appropriate expiry period (recommended 12 or 24 months) click add the secret value is displayed only once so copy it immediately and store it securely alongside the application (client) id note you will not be able to retrieve the client secret value after navigating away from this page store it in a secure location such as a password manager or key vault configure redirect uris a redirect uri tells microsoft where to send the authentication response after a user successfully signs in it must match exactly what your onprintshop site sends during the oauth flow in your registered app, click authentication from the left sidebar click + add a platform select web from the platform options add the following redirect uri, replacing yourdomain com with your actual store domain https //yourdomain com/admin/configuration external service listing php click save to apply the changes note ensure the redirect uri uses the same protocol (https) and domain as your live store any mismatch will cause authentication errors during the onedrive connection admin panel configuration in onprintshop onedrive storage configuration with the microsoft app registered and credentials ready, configure the onedrive integration inside your admin panel log in to your admin panel and navigate to the admin > store configuration > external service settings > cloud storage tab locate microsoft onedrive and click the enable toggle to activate it click the action menu > select edit enter the application (client) id and client secret value you obtained from the previous steps click generate link in the next screen, click connect me sign in with your microsoft account and grant the required onedrive permissions an access token will be generated and saved automatically enter the folder name where customer uploaded files will be stored in onedrive click save and back to complete the configuration note you may reuse the same client id and client secret under external service settings → social sharing → microsoft to enable onedrive login no new registration is required configure hot folder settings for onedrive the hot folder is a designated folder that holds exported order files once onedrive is integrated, you can point the hot folder location to onedrive so that all exported order files — including print job tickets — are transferred directly to your cloud storage in the admin panel, navigate to the orders > export/api orders > export/api settings and move to the hot folder settings tab locate the folder location field and select onedrive from the dropdown options define the folder name and folder structure as required for your workflow click save to apply the updated settings note ensure onedrive has been successfully connected in step 4 before configuring the hot folder the cloud storage option will only appear once the integration is active enable cloud file upload for products to allow customers to upload files directly into your onedrive storage from the storefront, you must enable the cloud file upload option individually for each applicable product in the admin panel, navigate to the products > print products click the action dropdown of the desired product, select settings on the settings screen, move to the upload tab locate the allow cloud file upload field, select the both radio button to enable both local and cloud upload options click save once enabled, a "click here to upload large files" button will appear on the upload design page of your storefront customers can use this to upload files directly into the configured onedrive folder note this setting is per product and does not apply globally repeat these steps for every product where you want to enable onedrive cloud uploads