Microsoft OneDrive integration - 4.0 #17134232/HEAD / v52 |
Tags:
not added yet
Table of Contents
Feature detailsThe Edit in Cloud feature allows users to edit office documents (stored in their Document type trackers) in a cloud provided editor, in this case Microsoft's online editor. The feature uses the Microsoft Graph API to provide the ability to edit documents, so to use this feature there are a few things required:
ConfigurationHere you can find how to configure this feature to be able to use it. To use the Edit in cloud feature with Microsoft, first of all an Azure application is required.The configuration allows arbitrary Azure application usage, so it is up to the configurator whether they use a self maintained Azure application or the one provided by Intland. Configuring your own Azure applicationAn Azure application is necessary to ask the appropriate permissions from the user to be able to upload, download and create files in the user's OneDrive. To configure an Azure application, you will need a microsoft account with proper permissions to create such application. In this section you can find the steps to create the required Azure application from start to finish. The first step is to go to the Azure portal: https://portal.azure.com
Search for tha Azure Active Directory service and select it.
From the left side menu, select the "App registrations" menu option.
Click on the "New Registration" button at the top.
Give the application a name and select the target audience. Here you can specify who can use this application and which kind of accounts can authenticate through the application. If you decide that only your organization (in case of business account) should use the application and for improved security you don't want to allow other users to authenticate, then select the "Single tenant" option. Enter the Redirect URI which should be the following format: https://YOUR_INSTANCE_URL_WITH_CONTEXT_PATH/rest/exposed/finish-microsoft-auth When finished, click on the Register button.
Now you have the application's ID (client ID) take a note of this ID because you will need it for the instance configuration. Click on the "API permissions" from the left side menu.
Click on the "Add permission" and from the appearing right panel, select the "Microsoft Graph" option.
The application to work properly needs two permissions from the user:
Select these permissions after you selected the "Delegated" option from the panel.
After setting the application permissions, select the "Certificates & secrets" option from the left side menu. Click on the "New client secret" button.
Optionally you can give a description for the secret, and set an expire date, then click on the "Add" button at the bottom.
Note the generated secret's value because this also required by the instance configuration. Lastly, select the "Authentication" from the left menu and check the "Access tokens" and "ID tokens" checkboxes.
With all of this, the Azure application is all set, the next thing is to apply the noted client ID and secret in the instance's application configuration. Go to your instance and open the Application configuration from the System Admin page. Enter the following configuration: "editInMicrosoftCloud" : { "clientId" : "YOUR_CLIENT_ID", "clientSecret" : "YOUR_CLIENT_SECRET", "enabled" : true, "parentFolderName": "intland.com", "redirectURI" : "YOUR_INSTANCE_LOCATION_WITH_CONTEXT_PATH/rest/exposed/finish-microsoft-auth" }
You can enable and disable the feature using the "enabled" property. The "parentFolderName" property is used as a folder name in your OneDrive where the cloud edited files will be uploaded. Make sure that this name is unique and there are no other folders in the root of your OneDrive. The "redirectURI" must be your instance's URL with context path and the following postfix: /rest/exposed/finish-microsoft-auth Save the configuration and everything is now set up to use the feature. Please make sure that there is no other cloud edit configuration is enabled at the same time! The configuration only allows one cloud edit configuration at the same time, so for example if Google Drive cloud editing is also enabled along with the Microsoft OneDrive cloud editing, neither of the features will work! Use the Azure application provided by IntlandThere is a production version Azure application that is meant to be used by everyone who use this feature. Every product has the configuration of this Azure application as a default and the feature is also enabled by default, so you are all set up, the feature should work using our Azure application out of the box! Use casesEdit a document in Microsoft's cloud editorWith the Edit in cloud feature configured and enabled, one can edit multiple documents from their Document type tracker in Microsoft's online editor. The supported file formats where the feature can be used are the following:
First of all, we need a document, let's say a Word document, like this:
The first thing to do is upload this Word document to one of our Document type trackers.
After the upload finished, hover over the uploaded document's row, and click on the more menu to reveal the cloud edit options.
Click on the "Edit on OneDrive" option. If you using this feature for the first time, an authentication popup will show up, where you need to login with your Microsoft account.
After signing in, you will see the consent screen of the application, where you can see what permissions the application use and in order to continue, you need to accept these permissions.
Optinally you might need to login to your instance after accepting the permissions. In case of successful authentication, the popup closes itself and the Word document is being uploaded to OneDrive. After the upload finish, the online editor will open automatically.
Here you can edit the document just like a regular document in your OneDrive. After this point you have 2 options:
The finish option grabs the document from your OneDrive with all it's content and after downloading it, the Document in your Document type tracker is updated to this downloaded version. The cancel option simply discards the cloud edit and the changes made to the uploaded document won't be downloaded. Please note that both of these options result in deleting the document from your OneDrive! Before you click on the finish option, make sure that Microsoft's online editor is closed, because it locks the document and download is not possible for a locked document!
Working together on a document in cloudOnce a document is uploaded (Cloud edit started) to your OneDrive, it is only visible and editable to you specifically. However, others can still see and open the cloud edited document from the system. The below screenshot is from a different (but project admin) user's perspective:
Opening the document from a different user will most likely to result in a permission request page:
Here you can request access to the document, which will send and email to the owner of the document who can grant access to it. After gaining access, you can both work on the same document simultaneously. Please note that even if you have access to the document, you will not have the ability to finish or cancel the cloud edit in the system, only the owner of the document can finish or cancel it.
Create a new document by selecting a file from OneDriveIt is possible to create Documents not just by dragging and dropping a file from your file system (or picking one through the browser's dialog) but by picking the file from your OneDrive. For this feature to work, the Edit in cloud feature must be enabled from the application configuration. Click on the "Add documents" at the top left corner on a Document type tracker to open the create documents dialog.
Here you can find the "Add from OneDrive" button which will open the OneDrive file picker. Please note that Microsoft authentication is required to use this feature, if you have not yet logged in with your Microsoft account, the authentication popup will appear before showing the picker dialog!
From the dialog, you can select multiple files, then by clicking on the "select" button, the selected files will be downloaded and they will appear as new documents in the Document type tracker. After creating the documents in the system, they behave like a regular file picked from the file system. Please note that not just Office type files can be picked using the dialog, other file types like text document (.txt) or images can also be introduced to the system through this dialog, however the cloud edit feature will only be available for the supported document types. Update an existing document by selecting a file from OneDriveJust like creating a new document using the OneDrive picker dialog it is also possible to update an existing document by selecting a file from your OneDrive. Open an existing document from a Document type tracker and click on the "Upload Document" button.
From the appearing dialog, select the "Add from OneDrive" button and the same picker dialog will appear as at new document creation.
Please note that since here the goal is to replace an existing document, you can only select one file fromg the OneDrive picker dialog! Create new empty Office documentsThis feature provides a way to create new empty documents through our system. There are three types of documents that the feature supports:
To create a new empty document, click on the Add documents button then click on the caret icon next to the "Add from OneDrive" button to reveal the types menu.
After selecting the new document's type, you need to give the new document a name.
The name does not need to contain the file extension (.docx, .xlsx, etc.) it will be added automatically depending on the type of document you chose. Please note that OneDrive does not allow files to exist with the same name, so make sure that the name you give for the new file does not exist yet under the cloud edit folder in your OneDrive. After typing in the name, click on the "create" button and the creation will begin. When the creation finish, the online editor for the empty file will open automatically on a new browser tab. This means that in this case, not just the new document is being created in the system, it is automatically cloud edited immediately after creation. Force cancel other's cloud edited documentSince a cloud edited document can only be finished or canceled by the user who started the edit in the first place, in some cases it might be necessary to intervene and cancel an existing cloud edited document progress so others can access the document. When a document is being edited in the cloud, it can only be accessed for read, but nobody can update the document in any way except for the cloud edit owner. To give more flexibility, project admin users (any only project admin users) have the option to force cancel a cloud edited document which started by others but neither finished, nor cancelled.
This option does not remove the document from the owner's cloud, but rather removes the link between the document in the system and the file in the cloud. Later the changes made by the owner can be recovered manually from the owner's OneDrive and optionally the document still can be updated using the file and the OneDrive file picker dialog. TroubleshootingThere are several cases where issues can happen considering the inconsistency of Microsoft Graph API. Most of the times it is a good approach to simply just retry what we did again, maybe after a page refresh or logging out then in again. If that does not help enable the debug mode for the feature in the System Admin settings, reproduce the issue and ask for help from our support with the logs. To enable debug for the feature, add the following lines to the Logging configuration in the System Admin page: log4j.logger.com.intland.codebeamer.controller.rest.v2.cloud.edit=DEBUG log4j.logger.com.intland.codebeamer.manager.cloud.edit=DEBUG
Common issues can happen when:
SecurityAfter the user signed in with the Microsoft account, the system will receive a token which is used to communicate with Microsoft Graph API. Long term tokens are used, which means that you do not have to authenticate every day if you use the featues, just after a longer period of time. There is a renew token which is also received along with the regular token, which can be used to renew the authentication in case it expires. This happens seamlessly in the background. You can always go into your Microsoft account settings and remove the permissions from the application. Here are the steps to remove the permissions from the application:
LimitationsFirst time access to a user's personal drive through Microsoft Graph before the user accesses their personal site through a browser leads to a 401 response. (https://docs.microsoft.com/en-us/graph/known-issues#files-onedrive) On the OneDrive picker dialog, ordering is only supported by the "Name" column. There are no known file size lmitations at the moment. Files with the same name cannot exist in the user's OneDrive at the same path. For private Microsoft accounts the Sharepoint sites section is not available on the OneDrive picker dialog, it is only accessible by business (organization) accounts. The online editor cannot be used for the following file extensions:
|
Fast Links
codebeamer Overview codebeamer Knowledge Base Services by Intland Software |
This website stores cookies on your computer. These cookies are used to improve your browsing experience, constantly optimize the functionality and content of our website, furthermore helps us to understand your interests and provide more personalized services to you, both on this website and through other media. With your permission we and our partners may use precise geolocation data and identification through device scanning. You may click accept to consent to our and our partners’ processing as described above. Please be aware that some processing of your personal data may not require your consent, but you have a right to object to such processing. By using our website, you acknowledge this notice of our cookie practices. By accepting and continuing to browse this site, you agree to this use. For more information about the cookies we use, please visit our Privacy Policy.Your preferences will apply to this website only.