Home > Back-end >  How to check connectivity to Microsoft Graph Api
How to check connectivity to Microsoft Graph Api

Time:01-04

Behind the problem:

I am using Microsoft Graph to receive some emails and store them in a database using SSMS and SQL Server. This is done once every day. I will have to delete the current data in the database and get the new fresh one from the Graph API.

But before I delete the data from my database, I will need to make sure that I am connected to Microsoft Graph.

An example of what I expect

1

So the question(s) is: how do I check the connectivity to Microsoft Graph?

I have not tried anything special, but I expect to call a method that would return a true value if there is a connection and a error of some sort if there ain't a connection.

CodePudding user response:

I have come to the conclution that for Microsoft Graph, it would be best to do the following:

1: Call the API, and recieve data.

2: Check the recieved data and check if it alright.

3: Overrite the data in the DB.

Thank you for the comments, they helped me come to my solution.

  • Related