conexión app de azure con lista de sharepoint

Admin Ms ITS 0 Reputation points
2024-12-17T15:09:45.5666667+00:00

se requiere realizar una consulta de na lista de un sitio de sharepoint a partir de una api, quiero realizar la conexion del sitio con mi app de azure previamente creado para realizar el consumo de los datos de la lista.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,999 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenXu-MSFT 22,156 Reputation points Microsoft Vendor
    2024-12-18T02:24:52.5166667+00:00

    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:

    1. 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.
    2. Construct the API Query: Use the Microsoft Graph API to query the SharePoint list. The basic structure of the query will look like this:
            GET https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items
      
      Replace {site-id} with the ID of your SharePoint site and {list-id} with the ID of the list you want to access.
    3. 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.
    4. 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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.