Office365 Application
Integration of Office365 in XWiki |
Type | XAR |
Category | Application |
Developed by | |
Active Installs | 18 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Description
Integration of Office365 in XWiki
This macro connects XWiki to Office365, allowing to display office documents from OneDrive inside XWiki. It allows to search for OneDrive documents on the XWiki search page.
Limitations
- Only Office formats (Word, Excel, Powerpoint) can be embedded. PDF cannot because Office 365 does not provide an embed URL.
- Sharepoint documents can be embedded by URL but not searched.
Macro embed via URL
First you can embed an Office 365 documents by URL. This way of embedding does not require OAuth credentials to connect XWiki. To embed you just need to get the URL that is displayed when you view or edit an Office document on Office 365. An iframe is used to embed. You can also set width and height parameters of the iframe.
Macro embed via Search
You can embed via search. Just insert the office365 macro without any parameter and a search box will show up. You need to set OAuth credentials in the configuration for this to work (see configuration). You search and then choose the document to embed. To links ("change" and "view" are displayed to allow to change the embed document or view the document on Office365).
OneDrive search inside XWiki
If you setup OAuth credentials, activate the search UI extension in the Office 365 configuration in the XWiki administration and add the UI Extension point to the SolrSearchMacros page (see installation instructions) you will see a box showing up on the SOLR search screen of XWiki when searching. This box shows OneDrive results.
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki
To configure the extension to be able to use the other features, you will need to get OAuth2 credentials:
Create Office 365 OAuth Credentials
You will need to create credentials on Office 365/Azure AD. This can be done either in Azure AD or on this microsoft app registration web site. It might be necessary to be an admin in the organization
It is necessary to get an Application ID (clientid), create a password (secret)
and set the redirect URI ( http://[your domain]]/xwiki/bin/view/Office365/OAuth (or https) )
Permissions need to be set on the Graph API like below:
Here are some screenshots of the checkboxes checked on the Application Registration Portal:
In case you register the key using the Azure Portal here is how the rights should look
Enter the credentials in XWiki Administration
You will need to enter your credentials and your tenant ID (either yourorg.onmicrosoft.com or the full ID) in the Office365 section of the XWiki Administration.
Add the UI Extension point to the Main.SolrSearchMacro page
A UI Extension point needs to be added until is integrated in XWiki.
To add the extension point locate #\displaySearchForm in the page Main.SolrSearchMacros and add the foreach/end block after it:
#foreach ($extension in $services.uix.getExtensions("org.xwiki.platform.search.widget"))
{{html clean=false}}
$services.rendering.render($extension.execute(), 'xhtml/1.0')
{{/html}}
#end
#if ($text != '')
Release Notes
v1.1.2
Fix extension metadata
v1.1.1
Minor fix: Missing sites configuration in config page
v1.1
- Added support for PDF Viewing
- Added support for searching and embedding documents from sharepoint sites
v1.0
- Initial Release
- Allows to search and embed documents from your personal drive on Office365
- Allows to show search results from your personal drive in the XWiki Search
Dependencies
Dependencies for this extension (org.xwiki.contrib:application-office365 1.1.2):
- com.microsoft.azure:adal4j 1.2.0
- org.xwiki.contrib.showhide:showhide-macro 2.0
- org.xwiki.contrib:xwiki-macro-pdfviewer 1.6.2