Using OneDrive for electronic files
Prerequisites:
- Access to the Configuration > General parameters (DC035) menu.
- Access to the File > Document (DC003) menu.
- Microsoft Azure user with Global Admin privileges.
- SoftExpert Document user with the "View" and "Edit" controls enabled in the security list of the document.
- Outlook e-mail registered in the SoftExpert Suite user.
- Document in the "Revision" or "Indexing" steps.
Introduction
The Document component allows using OneDrive to edit and view the electronic files of the documents during revision or indexing. The file will be opened through the Office365 applications (Word, Excel etc.) and, upon closing the revision, it will be stored again in the Document component.
However, OneDrive must be integrated with the Document component to be able to edit the electronic files through Office.
See how to perform these operations below:
Configuring the OneDrive API
1. Access the Microsoft Azure portal.
2. On the side panel, click on Azure Active Directory > App registrations.
3. Select the New registration option
4. Fill out the fields that will be displayed:
Name | Enter the "SE Document" name. |
Supported account types | Select the Accounts in this organizational directory only option. |
Redirect URL | Select the Web option and fill out the field with "http://localhost". |
5. Click on Register.
6. On the screen that will be displayed, copy the values displayed in the Application (client) ID and Directory (tenant) ID fields and store them in a safe location, as they will be used later.
7. In the Manage section of the side panel, click on Branding and Properties. Fill out the Homepage URL field with http://localhost and save.
8. Still in the Manage section, click on Owners.
9. If the logged user is not displayed in the listing, click on the Add owners option, locate and select the logged user, and click on the Select button at the bottom of the screen.
10. Click on the user name in the displayed listing. On the screen that will be displayed, copy the value of the Object ID field and store it in a safe location, as it is the User ID that will be used to configure the API in the general parameters of the Document component.
11. Return to the application home screen, access the API permissions section, and click on the Microsoft Graph > User.read option.
12. On the panel that will be displayed, click on the Remove permission option and confirm the deletion.
If the "Unable to complete due to service connection error, please try again later" error occurs, please wait a few hours and try again.
13. Once done, click on the Add a permission option that will be displayed.
14. On the side panel, click on Microsoft Graph > Application permissions.
15. Locate and check the options: Files.Read.All, Files.ReadWrite.All, Sites.Read.All, Sites.ReadWrite.All.
16. Once done, click on the Add permissions button.
17. Still in the API permissions section, click on Grant consent and confirm.
18. On the panel that will be displayed, fill out the Description field with the "admin" value and, on the Expires on field, select the 24 months option. Lastly, click on Add.
19. At this point, the client secret will be displayed in the listing. Copy the content shown in the Value column and store it, as it will be used later.
For further details on this procedure, refer to the trainings given by Training SoftExpert.
Integration with the Document component
1. Access the Configuration > General parameters (DC035) menu and go to the Microsoft OneDrive section.
2. Check the Enable editing with Microsoft OneDrive option.
3. Fill out the necessary fields:
Tenant ID | Enter the directory (tenant) ID that was obtained from the Azure Active Directory properties. |
User ID | Enter the user ID of the user whose OneDrive will be used to store the files. |
Client ID | Enter the application (client) ID obtained during the configuration in the Azure Active Directory. |
Client Secret | Enter the client secret value obtained during the application configuration in the Azure Active Directory. |
4. Check the Convert file to PDF using OneDrive option if desired. Once this option is checked, the system will use Google Drive to convert the electronic files of documents to PDF, as long as publishing in PDF is configured in their category.
- The OneDrive API is compatible with files with the following extensions: .doc, .docx, .odt, .xls, .xlsx, .xlsm, .ods, .ppt, .pptx, .pps, .ppsx, .potm, .odp and .pdf.
- When trying to edit files with a non-compatible extension such as .doc or .xls, the system will not allow the operation. It will be necessary to save the file in a compatible extension.
- When the (administrator) accounts are switched, the files will remain linked to the old account. In order not to lose information, make sure the files have been released before switching accounts.
- By using this API, resources such as docvariables and watermarks will be applied.
Using OneDrive for electronic files
1. Access the File > Document (DC003) menu.
2. In the list of records, select the desired documents.
- To edit the electronic file, click on the button on the toolbar. Save the changes upon exiting.
- To view the electronic file, click on the button on the toolbar.
- If the Double click electronic file to view it option is checked in the General tab of the general parameters, the files can also be viewed by double-clicking on the document to which they belong. This option will not be available if the document status is "Issue".
- It is possible to view the electronic file in a quick way by clicking on the icon displayed in the EF column. If there is more than one electronic file associated with the document, a screen will be opened with a list of all associated electronic files. Click on the file you wish to view.
In addition to the File > Document (DC003) menu, it is possible to view or edit the electronic files in the revision or indexing steps through OneDrive in the following menus:
- Execution > Revision (DC016);
- My Tasks (Execution) > Document revision;
- My Tasks (Tracking) > Revision tracking.
In other menus, the file will be opened by the viewer configured in the Application tab of the general parameters.
Conclusion
Thus, OneDrive has been integrated, and the electronic file was viewed and edited with Office.