Hello, how can we help you?

Recent Searches: Exploring variants and calculating conformity - Creating a process mining analysis - Configuring a predictive analysis type - Analyzing data with KPI

Editing and viewing electronic files with OneDrive

 

Prerequisites

  • Access to the Configuration > General parameters (DC035) menu.
  • Access to the File > Document (DC003/DC010) menu.
  • Microsoft Entra ID user with Global Admin privileges.
  • SoftExpert Document user with the "View" and "Edit" controls enabled in the security list of the document.
  • Document in the "Revision" or "Indexing" step.

 

Introduction

The Document component allows for using Microsoft OneDrive to edit and view electronic files during the revision or indexing step.

When this resource is used, files are opened directly through Office 365 applications (Word, Excel, PowerPoint, etc.) and, once the revision is completed, they are automatically stored again in the Document component.

For this feature to be enabled, it is necessary to integrate the Microsoft 365 API with the Document component, which ensures that electronic files can be edited later with the Office package.

Below, see the procedures you need to perform in order to use this resource.

 

Creating a site in your company's SharePoint

1. Access SharePoint.

2. Log in with your Microsoft work account.

3. Click on SharePoint or go directly to: https://yourdomain.sharepoint.com.

4. Click on the + Create site in the upper left corder of the screen.

5. Choose the desired site type for the team.

3. Set up the site by filling in the following fields:

  • Site name: enter the name of your site.
  • Description (optional): describe the site's purpose.
  • Privacy (for team sites):
    • Public: anyone in the organization can access.
    • Private: only guest members can access.
  • SharePoint automatically generates the site's address (URL), but it is possible to adjust it as needed.

4. Add the site's owners and members (or skip this step and add them later).

5. Click on Finish

To take the steps above, you must have a Microsoft 365 account with access to SharePoint and permission to create sites in the organization.

 

 

Configuring the Microsoft 365 API

1. Access the Microsoft Entra portal.

2. In the side panel, click on App registrations.

3. Select the New registration option 

4. Fill in the fields that will be displayed:

Name Enter "SE Document" as the name.
Supported account types Select the Accounts in this organizational directory only option.
Redirect URL Select the Web option and fill in the field next to it with "http://localhost".

5. Click on Register.

6. On the screen that will be displayed, copy the values shown 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 in 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 on the list, click on the Add owners option, locate and select the user, and click on the Select button. 

10. Return to the application's home screen, access the API permissions section, and click on the Microsoft Graph > User.read option.

11. In 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.

 

12. Once done, click on the Add a permission option that will be displayed.

13. In the side panel, click on Microsoft Graph > Application permissions.

14. Locate and check the Sites.Selected option.

15. Once done, click on the Add permissions button.

16. Still in the API permissions section, click on Grant consent and confirm.

17. In the panel that will be displayed, fill in the Description field with the "admin" value, and, in the Expires on field, select the 24 months option. Lastly, click on Add

18. In Certificates and secrets, click on New client secret, fill in the Description field with the "admin" value, and, in the Expires on field, select "24 months". Lastly, click on Add

19. At this point, the client secret will be displayed on the list. Copy the content shown in the Value column and store it, as it will be used later.

 

Getting the site's ID

1. To get the site's ID, access Graph Explorer.

2. Execute a GET request to the URL https://graph.microsoft.com/v1.0/sites/{hostname}:/sites/{site-path}, with {hostmname} being the company's host in SharePoint, and {site-path}, the site's name.

Example: if the site is https://yourdomain.sharepoint.com/sites/yoursite, the host is “yourdomain.sharepoint.com” and the site's name is “yoursite”.

 

3. Upon executing the request, copy the value of the ID field.

4. Then, grant permission to the application for access to the site. To do so, use the ID copied from the previous step in order to execute another request via Graph Explorer:

POST https://graph.microsoft.com/v1.0/sites/{siteId}/permissions

Content-Type: application/json

{

 "roles": ["write"],

 "grantedToIdentities": [

   {

     "application": {

       "id": "<client-id-do-seu-app>",

       "displayName": "<nome-do-seu-app>"

     }

   }

 ]

}

If error 403 occurs in the request, follow the instructions below:

1. Click on the Modify permissions tab, in the upper part of Graph Explorer.

2. Search for Sites.Selected.

3. Click on Consent as admin (if you are global admin or SharePoint admin).

4. On the Microsoft login screen that will open, confirm the permission for Graph Explorer.

Until permission is given, Graph Explorer will not be able to execute the POST/permissions in order to grant the site access to the application.

 

 

Configuring integration in the Document component

1. Access the Configuration > General parameters (DC035) menu and go to the Microsoft 365 section.

2. Check the Enable editing with Microsoft 365 option.

3. Fill in the necessary fields:

Tenant ID Enter the directory (tentant) ID obtained from the application's properties in Microsoft Entra.
Site ID Enter the ID of the configured Microsoft SharePoint site.
Client ID Enter the application (client) ID obtained during the configuration of the application in Microsoft Entra.
Client Secret Enter the client secret value obtained during the configuration of the application in Microsoft Entra.

4. Check the Convert to PDF using Microsoft 365 option, if you wish. With this option checked, the system will use the integration with Microsoft 365 to convert the electronic files of documents to PDF, provided that PDF publishing is configured in the document category.

  • The Microsoft 365 API is compatible with files in the following extensions: .doc, .docx, .odt, .xls, .xlsx, .xlsm, .ods, .ppt, .pptx, .pps, .ppsx, .potm, .odp, and .pdf.
  • If there is a change of sites, the files will remain linked to the former site. In order not to loss information, make sure the documents are released before changing sites.
  • When this API is used, features such as watermarks will not be applied.
 

 

Using Microsoft 365 to edit and view electronic files

1. Access the File > Document (DC003) menu or the Document (DC010) menu.

2. Locate and select the desired document.

3. Click on the button to edit the electronic file; save the changes before exiting.

4. Click on the button to view the electronic file.

  • 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 quickly 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 also possible to view or edit electronic files via Microsoft 365, from the menus below. In other menus, the file will be opened by the viewer configured in the Application tab of the general parameters.
    • Execution > Revision (DC016).
    • My tasks (Execution) > Document revision.
    • My tasks (Tracking) > Revision tracking.
 

 

Conclusion

Thus, Microsoft 365 has been successfully integrated and electronic files can now be edited and viewed with the Office package.


Was this article helpful?