OneDrive Archiving
How to configure automatic archiving of approved documents to OneDrive through the ssm.ro platform.
OneDrive archiving runs daily, outside business hours, for approved documents.
Step 1 — Add a new application in Azure Portal
- Go to Azure Portal — App Registrations
- Create a new registration
- Check Accounts in any organization
- Under Redirect URI, choose the Web platform and enter the address shown in
Settings > Electronic archive > OneDrive in the ssm.ro platform
(of the form
https://www.appssm.ro/callbacks_one_drive) - After adding the application, find the Client ID under Overview — save this value
Note: The redirect address is the same for every organization on the platform. If you have several organizations, you can use one Azure application for all of them, with a single Redirect URI.
Step 2 — Enable token-based authentication
In the application settings in Azure Portal, enable token-based authentication (ID tokens / Access tokens).
Step 3 — Add a secret and save the value
- Go to Certificates & Secrets > New Client Secret
- Add a secret and save the secret value (not the ID)
- Note the expiration date and update the secret before it expires
Warning: The secret value is required, not its ID.
Step 4 — Configure API permissions
Under API Permissions, add the following permissions:
| Permission | Type | Admin consent |
|---|---|---|
Directory.ReadWrite.All | Application | Yes |
Files.ReadWrite.All | Application | Yes |
offline_access | Delegated | No |
User.Read | Delegated | No |
Grant admin consent for the Application-type permissions.
Step 5 — Obtain the Drive ID to be used
Depending on the type of drive you will use:
- Go to OneDrive > My Files and save the CID value from the URL (e.g.
1DE8...2A7) - For business accounts: obtain the drive ID using Microsoft Graph Explorer — after authenticating, check the my profile and get items in my drive operations
Step 6 — Enter the values in the ssm.ro platform
Go to Settings > Electronic archive > OneDrive and enter:
- Client ID (from Step 1)
- Secret value (from Step 3)
- Drive ID (from Step 5)
After you click Activează, you will be redirected to Microsoft to confirm access. If the settings are correct, you will be redirected back to the ssm.ro platform, archiving will be activated, and a directory for the configured organization will appear in the Drive.
Keep in mind:
- The Microsoft confirmation must be completed within 15 minutes of clicking Activează.
- You must stay signed in to the ssm.ro platform, in the same browser and with the same account that started the connection.
- The return link can be used only once. If you see the message „Sesiunea de conectare a expirat sau a fost deja folosită”, restart the procedure from Settings > Electronic archive > OneDrive.
- If the data is not correct, you return to the settings page with the message „Conectarea la OneDrive nu a reușit”. Check Client ID, Secret value and Drive ID, then try again.
Reconnecting (Azure applications configured earlier)
The redirect address has changed. It used to be different for each organization; now there is a single one for the whole platform:
| Redirect address | |
|---|---|
| New — use this one | https://www.appssm.ro/callbacks_one_drive (the address shown in Settings > Electronic archive > OneDrive) |
| Old — no longer works | https://organization.appssm.ro/one_drive_connect |
- If OneDrive archiving is already active, you do not need to do anything: it keeps working.
- If you disable and re-enable archiving, or configure a new organization with an older Azure application, replace the old address with the new one in Azure Portal, under Authentication > Redirect URIs (Web platform). Without the new address, Microsoft shows a "redirect URI mismatch" error (AADSTS50011).