Home
Home
German Version
Support
Impressum
22.1 Release ►

    Main Navigation

    • Preparation
      • Connectors
      • Initial Startup for G7 appliances
      • Setup InSpire G7 primary and Standby Appliances
    • Datasources
      • Configuration - Atlassian Confluence Connector
      • Configuration - Best Bets Connector
      • Configuration - COYO Connector
      • Configuration - Data Integration Connector
      • Configuration - Documentum Connector
      • Configuration - Dropbox Connector
      • Configuration - Egnyte Connector
      • Configuration - GitHub Connector
      • Configuration - Google Drive Connector
      • Configuration - GSA Adapter Service
      • Configuration - HL7 Connector
      • Configuration - IBM Connections Connector
      • Configuration - IBM Lotus Connector
      • Configuration - Jira Connector
      • Configuration - JiveSoftware Jive Connector
      • Configuration - JVM Launcher Service
      • Configuration - LDAP Connector
      • Configuration - Microsoft Azure Principal Resolution Service
      • Configuration - Microsoft Dynamics CRM Connector
      • Configuration - Microsoft Exchange Connector
      • Configuration - Microsoft File Connector (Legacy)
      • Configuration - Microsoft File Connector
      • Configuration - Microsoft Graph Connector
      • Configuration - Microsoft Project Connector
      • Configuration - Microsoft SharePoint Connector
      • Configuration - Microsoft Stream Connector
      • Configuration - Microsoft Teams Connector
      • Configuration - Salesforce Connector
      • Configuration - SAP KMC Connector
      • Configuration - SemanticWeb Connector
      • Configuration - ServiceNow Connector
      • Configuration - SharePoint Online Connector
      • Configuration - Sitecore Connector
      • Configuration - Web Connector
      • Configuration - Yammer Connector
      • Data Integration Guide with SQL Database by Example
      • Indexing user-specific properties (Documentum)
      • Installation & Configuration - Atlassian Confluence Sitemap Generator Add-On
      • Installation & Configuration - Caching Principal Resolution Service
      • Installation & Configuration - Jive Sitemap Generator
      • Installation & Configuration - Mindbreeze InSpire Insight Apps in Microsoft SharePoint On-Prem
      • Mindbreeze InSpire Insight Apps in Microsoft SharePoint Online
      • Mindbreeze Web Parts for Microsoft SharePoint
      • User Defined Properties (SharePoint 2013 Connector)
      • Whitepaper - Mindbreeze InSpire Insight Apps in Salesforce
    • Configuration
      • CAS_Authentication
      • Cognito JWT Authentication
      • Configuration - Alternative Search Suggestions and Automatic Search Expansion
      • Configuration - Back-End Credentials
      • Configuration - Chinese Tokenization Plugin (Jieba)
      • Configuration - CJK Tokenizer Plugin
      • Configuration - Collected Results
      • Configuration - CSV Metadata Mapping Item Transformation Service
      • Configuration - Entity Recognition
      • Configuration - Exporting Results
      • Configuration - Filter Plugins
      • Configuration - GSA Late Binding Authentication
      • Configuration - Identity Conversion Service - Replacement Conversion
      • Configuration - Index-Servlets
      • Configuration - Item Property Generator
      • Configuration - Japanese Language Tokenizer
      • Configuration - Kerberos Authentication
      • Configuration - Management Center Menu
      • Configuration - Metadata Enrichment
      • Configuration - Metadata Reference Builder Plugin
      • Configuration - Mindbreeze Proxy Environment (Remote Connector)
      • Configuration - Notifications
      • Configuration - Personalized Relevance
      • Configuration - Plugin Installation
      • Configuration - Principal Validation Plugin
      • Configuration - Profile
      • Configuration - QueryExpr Label Transformer Service
      • Configuration - Reporting Query Logs
      • Configuration - Reporting Query Performance Tests
      • Configuration - Request Header Session Authentication
      • Configuration - Shared Configuration (Windows)
      • Configuration - Vocabularies for Synonyms and Suggest
      • Configuration of Thumbnail Images
      • Cookie-Authentication
      • Documentation - Mindbreeze InSpire
      • I18n Item Transformation
      • Installation & Configuration - Outlook Add-In
      • Installation - GSA Base Configuration Package
      • Language detection - LanguageDetector Plugin
      • Mindbreeze Personalization
      • Mindbreeze Property Expression Language
      • Mindbreeze Query Expression Transformation
      • Non-Inverted Metadata Item Transformer
      • SAML-based Authentication
      • Trusted Peer Authentication for Mindbreeze InSpire
      • Using the InSpire Snapshot for Development in a CI_CD Scenario
      • Whitepaper - SSO with Microsoft AAD or AD FS
      • Whitepaper - Text Classification Insight Services
    • Operations
      • app.telemetry Statistics Regarding Search Queries
      • Configuration - app.telemetry dashboards for usage analysis
      • Configuration Usage Analysis
      • Deletion of Hard Disks
      • Handbook - Backup & Restore
      • Handbook - Command Line Tools
      • Handbook - Distributed Operation (G7)
      • Handbook - Filemanager
      • Handbook - Indexing and Search Logs
      • Handbook - Updates and Downgrades
      • Index Operating Concepts
      • Inspire Diagnostics and Resource Monitoring
      • InSpire Support Documentation
      • Mindbreeze InSpire SFX Update
      • Provision of app.telemetry Information on G7 Appliances via SNMPv3
      • Restoring to As-Delivered Condition
    • User Manual
      • Cheat Sheet
      • iOS App
      • Keyboard Operation
    • SDK
      • api.v2.alertstrigger Interface Description
      • api.v2.export Interface Description
      • api.v2.personalization Interface Description
      • api.v2.search Interface Description
      • api.v2.suggest Interface Description
      • api.v3.admin.SnapshotService Interface Description
      • Debugging (Eclipse)
      • Developing an API V2 search request response transformer
      • Developing Item Transformation and Post Filter Plugins with the Mindbreeze SDK
      • Development of Insight Apps
      • Embedding the Insight App Designer
      • Java API Interface Description
    • Release Notes
      • Release Notes 20.1 Release - Mindbreeze InSpire
      • Release Notes 20.2 Release - Mindbreeze InSpire
      • Release Notes 20.3 Release - Mindbreeze InSpire
      • Release Notes 20.4 Release - Mindbreeze InSpire
      • Release Notes 20.5 Release - Mindbreeze InSpire
      • Release Notes 21.1 Release - Mindbreeze InSpire
      • Release Notes 21.2 Release - Mindbreeze InSpire
      • Release Notes 21.3 Release - Mindbreeze InSpire
      • Release Notes 22.1 Release - Mindbreeze InSpire
    • Security
      • Known Vulnerablities
    • Product Information
      • Product Information - Mindbreeze InSpire - Standby
      • Product Information - Mindbreeze InSpire
    Home

    Path

    Sure, you can handle it. But should you?
    Let our experts manage the tech maintenance while you focus on your business.
    See Consulting Packages

    Mindbreeze InSpire Search Applications in Microsoft SharePoint Online

    Copyright ©

    Mindbreeze GmbH, A-4020 Linz, 2020.

     

    All rights reserved. All hardware and software names are trade names and/or trademarks of their respective owners.

    These documents are strictly confidential. The delivery and presentation of these documents alone does not justify any rights whatsoever to our software, our services and service performance results or other protected rights. The disclosure, publication or reproduction hereof is not permitted.

    For reasons of easier legibility, gender differentiation has been dispensed with. In terms of equal treatment, appropriate terms apply to both sexes.

    IntroductionPermanent link for this heading

    This document describes the integration of Mindbreeze InSpire search applications in Microsoft SharePoint Online.

    Software PrerequisitesPermanent link for this heading

    The descriptions and instructions contained in this document are based on Microsoft SharePoint Online.

    Embedding a Search ApplicationPermanent link for this heading

    Search applications are stored as text documents in Microsoft SharePoint and embedded in pages with the “Content Editor” Web Part. Thus, a search application can be used on multiple pages and still remain easy to maintain.

    Saving a search application in a text documentPermanent link for this heading

    Copy the snippet from the Mindbreeze InSpire Designer into a text document. Click here for more information: Development of Search Apps.

    Uploading the text documentPermanent link for this heading

    Upload the document to a document library:

    Important Note:

    The “Application” object in (searchapp.txt) must include the query parameters “K” of Microsoft SharePoint online:

    <script>

    Mindbreeze.require(["client/application"], function(Application) {    

    window.appmb = new Application({ queryURLParameter: "k" });

    });

    </script>

    Copy the address of the document to the clipboard:

    Note: The above link is the URL of the document preview page.

    Change the URL to the following and copy it:

           https://<your-tenant>.sharepoint.com/sites/<your-site>/Shared%20Documents/searchapp.txt

    Note: Replace the brackets with your tenant name and site name. Copy the adjusted URL in a new bowser tab and make sure that it is working.

    (Classic Site) Creating a new Web Part pagePermanent link for this heading

    Navigate to “Site Contents” > “Site Pages“:

    Create a new “Web Part Page”:

    Choose a name and design. Create the page:

    Add a new “Content Editor” Web Part:

    Note: The “Content Editor” web part is not supported for modern pages (or Sites) according to Microsoft’s official documentation.

    To create a classic site, please refer to the following link:

    https://docs.microsoft.com/en-us/sharepoint/create-site-collection#create-a-classic-site

    Edit the Web Part settings:

    Insert the address (adjusted URL) of the text document in “Content Link”, then click “Apply”:

    Click “Stop Editing” to finish editing a page: Click

    (Modern Site) Script Editor Web PartPermanent link for this heading

    To redirect the search results to a modern site, you will need to add and configure a script editor web part. Please follow these steps:

    1. Download MicrosoftSharePointOnline-ModernScriptEditor-<xx.x.x.xxx>.sppkg from the Mindbreeze update center.
    2. Go to your tenant's app catalog: https://<tenant>.sharepoint.com/sites/AppCatalog/AppCatalog
    3. From the left menu choose “Apps for SharePoint” library. Then, upload the sppkg or drag and drop.

    4. Click “Deploy” from the popup window.

    5. Make sure the package is deployed without errors.

    1. Install the “App” in your modern site:
      1. From the site “Home” page: Click “+New” > “App”.

      2. From “Apps you can add” section, click on “Modern Script Editor web part” to install it.


        Note: Please wait for a minute until the app is installed and not grayed out in the “Site Contents” list. You may need to refresh the page if it is still grayed out.

    2. Create a new result page from the site’s “Home” page.
      1. Create the a “Blank” page and click “Create page”.

      2. Choose a name for your page and click “Publish”.

    1. Edit the page to add the script editor web part.
      1. From the top right of the page, click on “Edit”. Then click on the plus icon to add a new web part.


    1. Type “script” in the search box and choose “Modern Script Editor”

    1. Click on “Edit Markup”. The configuration pane is opened. Click on “Edit HTML code”.
      1. Copy and paste the content of your searchapp in the code editor.
      2. Follow the steps from “Important changes needed” described below
      3. Click on “Save”.
    2. Click on “Republish” to make the changes effective.

    Important changes needed:

    First, include the query parameters of Microsoft SharePoint Online in the Application object (in the code snippet) and export them to the window object. This can be done by adding the highlighted code below:

    <script>Mindbreeze.require(["client/application"], function(Application) {  

       window.appmb = new Application({

    rootEL: document.getElementById("mb-custom-searchapp-wrapper"),

    queryURLParameter: "k"

       });

    });

    </script>

    Additionally, listen to the Microsoft’s search box with “OnSubmitSearch” and redirect the search queries as shown below:

    <script>Mindbreeze.require(["client/application"], function(Application) {

        window.appmb = new Application({

            rootEl: document.getElementById("mysearchapp"),

            queryURLParameter: "k"

        });

    });

            window.O365Shell.Search.OnSubmitSearch(function(query) {

               window.appmb.setUnparsedUserQuery(query);

            });

    </script>

    Finally, to resolve the CSS conflicts between SharePoint Online and Mindbreeze, you have to point the <link> found at the top of the search app snippet to the minimal-prefixed-adapted.css:

    <link href="https://<your-inspire>/apps/designer/../css/v2/minimal-prefixed-adapted.css" rel="stylesheet">

    Changing the search results pagePermanent link for this heading

    Click on the gear icon “Site Contents”

    Click on “Site Settings”

    Go to the search section, then click on the “Search Settings” link.

    Then we will get into the “Search Settings” configuration page.

    Under “Which search results page should queries be sent to?”:

    • Select the radio button “Send queries to a custom results page URL”
    • Enter the custom search result page in “Result Page URL”.

    Click on the OK button – then wait for a minute to get the changes affected.

    Now, search for something in the top search box and hit enter – you should be redirected to the configured results page.

    TroubleshootingPermanent link for this heading

    4.1. Cross-origin resource sharing (CORS)Permanent link for this heading

    For security reasons, browsers restrict cross-origin HTTP requests initiated from scripts. In this case, when you open https://{mytenant}.sharepoint.com in a browser, a script from your appliance’s web server is loaded. This script then initiates XHR requests to your appliance, which is not allowed by the CORS policies by default. To allow requests from your SharePoint tenant to your appliance, you need to add your SharePoint tenant in the allowed origins of the CORS settings of your appliance. Configure the following in the Mindbreeze Management Center:

    Configuration > Client Services > Advanced Settings

    You can find further information in Documentation – Mindbreeze InSpire – CORS Header.

    Please note that changing the “Allowed Origins Pattern” option manually will overwrite the default values, see also Documentation – Mindbreeze InSpire – Default values.

    Download PDF

    • Mindbreeze InSpire Search Apps in Microsoft SharePoint Online

    Content

    • Introduction
    • Software Prerequisites
    • Embedding a Search Application
    • Troubleshooting

    Download PDF

    • Mindbreeze InSpire Search Apps in Microsoft SharePoint Online