SkyDrive Integration Setup

The setup of the Microsoft SkyDrive integration consists of the following steps. These steps can all be performed on the server where the ExtraView web application is installed, although the generation of the auth token step can be performed on any computer with Java installed. The installation and configuration steps need to be performed only once for the ExtraView application.

Create Live Connect API Application

A Live Connect API application is required for the integration to be able to connect to the SkyDrive account from ExtraView. Follow these steps to create and configure a new application:

  1. Go to the Live Connect Application Management site
  2. Login with your Microsoft account credentials
  3. Click on the Create application link
  4. Enter a value in the Application name field and click the I accept button to create the application. The new application will have a Client ID and Client secret assigned, which you will need to use in the setup steps below
  5. Go to the Application Settings Page and access the API Settings page. In the Redirect domain field enter "http://www.extraview.com/" (without quotes) and click the Save button to save changes. This value will also be used in the setup steps below.

Download Integration Software

Download the following files from the ExtraView download site. If you are not familiar with the download site, please contact the ExtraView support group.

GetSkyDriveTokens.zip
SkyDriveIntegration.class

Install Java

If you don't already have Java installed on your computer, download the latest Java runtime and install it according to the installer and instructions provided on the Java website.

Generate the SkyDrive Tokens

You must give the new Live Connect API application access to your SkyDrive account. Extract the GetSkyDriveTokens.zip file into a new directory, which will contain the following files:

NEW_DIRECTORY/
   GetSkyDriveTokens.jar
   lib/

The lib directory contains additional files necessary for the integration.

Open a Command Prompt window on your local computer and execute the following commands, replacing the uppercase text with appropriate values for your computer:

cd NEW_DIRECTORY
JAVA_HOME/bin/java -jar GetSkyDriveTokens.jar CLIENT_ID REDIRECT_URI CLIENT_SECRET

where NEW_DIRECTORY is the newly created directory with the contents of the GetSkyDriveTokens.zip file, JAVA_HOME is the path to your Java installation directory, CLIENT_ID is the client ID, REDIRECT_URI is the redirect URL, and CLIENT_SECRET is the client secret, all three values assigned to the new Live Connect API application you created above.

Information similar to the following will display in the Command Prompt window:

1. Go to URL: https://login.live.com/oauth20_authorize.srf?client_id=0000000000012345&scope=wl.offline_access%20wl.skydrive%20wl.skydrive_update&response_type=code&redirect_uri=http%3A%2F%2Fwww.extraview.com
2. Enter your SkyDrive credentials.
3. When redirected to http://www.extraview.com copy the code from the URL and enter it here:

Load the URL listed above in Step 1 within a web browser and enter your Microsoft account credentials. Once you login to the website, then click on the Yes button to give the app access to your SkyDrive account - this is Step 2. Your browser will be redirected to http://www.extraview.com with an extra code parameter (e.g., http://www.extraview.com/?code=890dfs-fds8989-fds8908-3241). Copy the text after "code=" and go back to the Command Prompt and paste it at the prompt - this is Step 3.

Information similar to the following will display in the Command Prompt window:

Access Token: EwCo...//access token string shortened for brevity//...AA==
Refresh Token: CkAC...//refresh token string shorted for brevity//...HBd2

Finally, copy the Access Token and Refresh Token values and save them in a text file named skydrive_tokens.properties in the directory <evj>/WEB-INF/configuration/ with the following format:

ACCESS_TOKEN = EwCo...//access token string shortened for brevity//...AA==
REFRESH_TOKEN = CkAC...//refresh token string shorted for brevity//...HBd2

Note: If you encounter an error while running the commands above in the Command Prompt, or the tokens are not displayed, then verify that you have performed the steps exactly as instructed and have used the appropriate Live Connect API application values. If you still receive an error, then contact ExtraView Support for assistance.

Configure ExtraView

The following settings need to be added to ExtraView's Configuration.properties file with the Live Connect API application settings and the absolute path to the new skydrive_tokens.properties file containing the tokens generated in the previous section. The Configuration.properties file is located in the directory WEB-INF/configuration/:

SKYDRIVE_CLIENT_ID = Client_ID
SKYDRIVE_REDIRECT_URI = Redirect_URI
SKYDRIVE_CLIENT_SECRET = Client_Secret
SKYDRIVE_TOKENS_FILE = Filepath_to_skydrive_tokens.properties

Log into the ExtraView web application with an account that has administrative privileges and set the following Behavior Setting to the value indicated:

USER_CUSTOM_CLASSNAME = com.extraview.usercustom.SkyDriveIntegration

Decide where all the files (attachments, document and image fields) uploaded to ExtraView are to be stored. The ATTACHMENT_REPOSITORY_OPT behavior setting controls this behavior. If all files are to be stored in the SkyDrive account instead of the ExtraView database or on the filesystem, then set the behavior setting to the following value:

ATTACHMENT_REPOSITORY_OPT = REPOSITORY

Install Custom Code

Install the SkyDriveIntegration.class custom code file by copying it to the following location in your ExtraView installation:

<evj>/WEB-INF/classes/com/extraview/usercustom/

where <evj> is the directory where the ExtraView application is installed. (Note: You will need to create the directory tree if it doesn't exist.) If you already have a custom code file for your installation, the source files must be merged and compiled. Contact ExtraView support for help with this step.

Next, install the following files extracted from GetSkyDriveTokens.zip (into NEW_DIRECTORY/lib above), to the <evj>/WEB-INF/lib/ directory of your ExtraView installation.

commons-logging-1.1.1.jar
httpclient-4.1.3.jar
httpcore-4.1.4.jar
json.jar

Lastly re-start the ExtraView web application in order for the integration to take effect.