Hi @Admin Ms IT,
To connect your Azure app to a SharePoint list and consume the list data, you will need to follow these steps:
- Grant Access: Ensure that your Azure app has the necessary permissions to access the SharePoint site. You can do this by configuring permissions in Azure AD and granting the app access to the SharePoint folder.
- Construct the API Query: Use the Microsoft Graph API to query the SharePoint list. The basic structure of the query will look like this:
ReplaceGET https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items
{site-id}
with the ID of your SharePoint site and{list-id}
with the ID of the list you want to access. - Authentication: Make sure to authenticate your requests using the OAuth 2.0 protocol. Your Azure app will need to obtain an access token to include in the authorization header of your API requests.
- Run the Query: Once you have the access token, you can execute the API query to retrieve the list data.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.