AMIR BAHROUNI
AMIR BAHROUNI

Reputation: 143

How to connect Microsoft Graph to Azure Sql Database?

I’m working on an application that allows you to make a data exchange between Azure sql Database and Sharepoint Online using Azure Functions (Timer Trigger ) . Really the first project in this environment ,I used Microsoft Graph to collect data from online sharepoint but didn’t really find a way to connect it with Azure Sql Database.My friend suggested me to try mapping data to Azure with Entity Framework Core but even with this solution I couldn’t transfer the data between them. I hope you can help me.

Upvotes: 0

Views: 1790

Answers (2)

wabi-sabi
wabi-sabi

Reputation: 11

Use MS Graph Connector to bring Azure SQL or MS SQL to SharePoint Online. Depends on supported data types on SQL, you'll need to modify source data types to brining it into SharePoint Online. This way, you can skip Azure Function, and use PnP Modern Search web parts to display data using MS Graph as data source. You can set how often to refresh source data.

Upvotes: 0

Dragan Panjkov
Dragan Panjkov

Reputation: 4332

Out of the box, Microsoft Graph does not provide you with APIs to work with Azure SQL Databases. Once you read the data from SharePoint Online using Microsoft Graph within your Azure Function, you might call Azure SQL Database directly from your Azure Function, similar to this: https://learn.microsoft.com/en-us/azure/azure-functions/functions-scenario-database-table-cleanup

Upvotes: 1

Related Questions