|

|  How to Integrate Microsoft Azure Cognitive Services with Microsoft SharePoint

How to Integrate Microsoft Azure Cognitive Services with Microsoft SharePoint

January 24, 2025

Unlock seamless collaboration by integrating Azure Cognitive Services with SharePoint. Step-by-step guide to enhance productivity and data management.

How to Connect Microsoft Azure Cognitive Services to Microsoft SharePoint: a Simple Guide

 

Set Up Your Azure Cognitive Services

 

  • Create an Azure account if you don't have one. Visit the Azure Portal to start the process.
  •  

  • In the Azure Portal, search for "Cognitive Services" and click on it.
  •  

  • Click "Create" and select the specific cognitive service you wish to integrate, such as "Computer Vision" or "Text Analytics".
  •  

  • Fill in the required details like the subscription, resource group, and pricing tier. Once configured, click on "Review + Create" and then "Create" to instantiate the service.
  •  

  • Navigate to the newly created service and get the necessary keys and endpoint URL, which will be needed for integration with SharePoint.

 

Prepare Microsoft SharePoint

 

  • Ensure you have administrative access to the SharePoint site where the integration will occur.
  •  

  • Familiarize yourself with Microsoft Graph API, as it is often used to interact with SharePoint data.

 

Azure Function as a Middleman

 

  • Log into the Azure Portal, and navigate to "Azure Functions".
  •  

  • Create a new Function App by clicking "Add". Fill in necessary details like the function app name and hosting details.
  •  

  • Once created, go to the new Function App and create a new function. Select an HTTP trigger for simplicity.
  •  

  • In the function's code editor, write the necessary code to call the Azure Cognitive Service. For instance, a Python example for Computer Vision service:

 

import requests
import json
import azure.functions as func

def main(req: func.HttpRequest) -> func.HttpResponse:
    key = "YOUR_COGNITIVE_SERVICE_KEY"
    endpoint = "YOUR_COGNITIVE_SERVICE_ENDPOINT"
    headers = {"Ocp-Apim-Subscription-Key": key, "Content-Type": "application/json"}
    params = {"visualFeatures": "Categories,Description,Color"}
    image_url = req.params.get("image_url")

    if not image_url:
        return func.HttpResponse("Image URL is required.", status_code=400)

    response = requests.post(endpoint + "/vision/v3.1/analyze", headers=headers, params=params, json={"url": image_url})
    
    if response.status_code == 200:
        return func.HttpResponse(response.text, status_code=200)
    else:
        return func.HttpResponse(response.text, status_code=response.status_code)

 

Integrate with Microsoft SharePoint

 

  • Use Microsoft Power Automate to call the Azure Function whenever an item is added or updated in SharePoint.
  •  

  • Create a new flow in Power Automate. Start with the "When an item is created or modified" trigger for SharePoint.
  •  

  • Add an action to "HTTP" to call the Azure Function. Pass necessary parameters like the document URL or any required details.

 

Test and Validate

 

  • Test the integration by adding or modifying an item in the configured SharePoint site. Monitor the flow to ensure it triggers the Azure Function successfully.
  •  

  • Check the Azure Function logs to verify it is receiving the data correctly and returning the processed information as expected.
  •  

  • Review the output within SharePoint to ensure that the desired cognitive service processes have been applied correctly.

 

Omi Necklace

The #1 Open Source AI necklace: Experiment with how you capture and manage conversations.

Build and test with your own Omi.

How to Use Microsoft Azure Cognitive Services with Microsoft SharePoint: Usecases

 

Intelligent Content Management System

 

  • Deploy Microsoft Azure Cognitive Services to automatically analyze and tag uploaded documents in a SharePoint library, enabling improved searchability of company resources.
  •  

  • Utilize Azure's form recognizer capability to extract data from scanned forms and images, automatically storing extracted data into SharePoint lists for easy accessibility and future reference.
  •  

  • Leverage language translation APIs to translate documents stored in SharePoint into multiple languages, enhancing collaboration in multinational teams.
  •  

 

Automated Document Processing Workflow

 

  • Set up a SharePoint list to initiate document processing workflows upon document submission, automatically triggering Azure Cognitive Services for necessary analysis and data extraction.
  •  

  • Create alerts and automated notifications via SharePoint when a document is processed, keeping teams informed of document availability and status changes.
  •  

  • Implement sentiment analysis using Azure text analytics on customer feedback documents, storing results in SharePoint for trend identification and service improvement initiatives.
  •  

 

Enhanced Security and Compliance

 

  • Utilize Azure's facial recognition to control and manage access to sensitive SharePoint documents, ensuring only authorized personnel can access specific content.
  •  

  • Integrate SharePoint's record management features with Azure's content moderation to ensure any uploaded content complies with organizational policies and regulatory requirements.
  •  

  • Automatically redact sensitive information from documents stored in SharePoint using Azure's text analytics, maintaining privacy and compliance within the organization.
  •  

 


from azure.ai.textanalytics import TextAnalyticsClient
from azure.core.credentials import AzureKeyCredential

# Sample code to connect Azure Cognitive Services

client = TextAnalyticsClient(endpoint="https://<your-cognitive-service>.cognitiveservices.azure.com/", credential=AzureKeyCredential("<your-key>"))

 

 

Intelligent Knowledge Retrieval

 

  • Integrate Microsoft Azure Cognitive Services to develop a sophisticated knowledge base within SharePoint, utilizing natural language processing (NLP) to understand user queries and provide precise information retrieval.
  •  

  • Deploy Azure's knowledge mining capabilities in SharePoint to automatically index and categorize large volumes of content, enabling users to quickly locate needed resources through intelligent search suggestions.
  •  

  • Implement Azure's QnA Maker service to transform traditional FAQ documents stored in SharePoint into dynamic, interactive chatbots, enhancing user engagement and accessibility.
  •  

 

Real-Time Language Assistance

 

  • Configure Azure Cognitive Services translation APIs to provide on-the-fly translation for SharePoint documents and content, fostering cross-cultural collaboration in diverse teams.
  •  

  • Enable multilingual communication by integrating Azure Speech Services to convert text within SharePoint documents into audio files in different languages, supporting auditory learning and comprehension.
  •  

  • Utilize Azure's speech-to-text service to transcribe and archive live meetings or webinars hosted on SharePoint, creating searchable transcripts for future reference and knowledge sharing.
  •  

 

Enhanced Data Insights and Visualization

 

  • Leverage Azure's cognitive services to perform in-depth data analysis on spreadsheets and datasets stored in SharePoint, extracting insights and trends for strategic decision-making.
  •  

  • Integrate Power BI with SharePoint to visualize data insights derived from Azure cognitive analytics, enabling stakeholders to access interactive dashboards and reports seamlessly.
  •  

  • Create automated data alerts and notifications for key metrics using SharePoint workflows connected with Azure Analytics, keeping teams informed of critical changes in data trends.
  •  

 

from azure.core.credentials import AzureKeyCredential
from azure.ai.language.questionanswering import QuestionAnsweringClient

# Sample code to connect QnA Maker with SharePoint knowledge base

client = QuestionAnsweringClient(endpoint="https://<your-cognitive-service>.cognitiveservices.azure.com/", credential=AzureKeyCredential("<your-key>"))

 

Omi App

Fully Open-Source AI wearable app: build and use reminders, meeting summaries, task suggestions and more. All in one simple app.

Github →

OMI NECKLACE + OMI APP
First & only open-source AI wearable platform

a person looks into the phone with an app for AI Necklace, looking at notes Friend AI Wearable recorded a person looks into the phone with an app for AI Necklace, looking at notes Friend AI Wearable recorded
a person looks into the phone with an app for AI Necklace, looking at notes Friend AI Wearable recorded a person looks into the phone with an app for AI Necklace, looking at notes Friend AI Wearable recorded
online meeting with AI Wearable, showcasing how it works and helps online meeting with AI Wearable, showcasing how it works and helps
online meeting with AI Wearable, showcasing how it works and helps online meeting with AI Wearable, showcasing how it works and helps
App for Friend AI Necklace, showing notes and topics AI Necklace recorded App for Friend AI Necklace, showing notes and topics AI Necklace recorded
App for Friend AI Necklace, showing notes and topics AI Necklace recorded App for Friend AI Necklace, showing notes and topics AI Necklace recorded