In this blog, we will show you how we can interact with SharePoint via Rest APIs and perform actions like adding, updating, deleting, and fetching data using Postman.
We are using two operations SharePoint App Registration and Azure AD app (Graph API).
The important factor is Authentication and Authorization while accessing SharePoint information.
First, you need SharePoint Authentication by generating ‘Client-ID’ and ‘Client-Secret’. For that refer to “SharePoint Authentication” from the below link:
Connection to Dynamics 365 and SharePoint Authentication Using ClientId & ClientSecret: Part 2
Now with the App registered, we are ready to access the SharePoint Online information from external system or tools.
We will retrieve the Tenant ID of SharePoint Online tenant using Postman tool.
EXAMPLE: https://testsite.sharepoint.com/_vti_bin/client.svc/
The response will fail with the status message “Unauthorized”. Do not worry we don’t need to fix this. From this, we just need to get “realm” and “client_id” from response header as mentioned below:
Now we will generate the bearer access token from the Postman tool, which will be used to access the SharePoint information.
https://accounts.accesscontrol.windows.net/[Tenant ID]/tokens/OAuth/2
Important Note – The access_token is valid only for a few hours (5 to 6 hours usually). So, you need to generate the new token regularly via clicking on the send button
Check the next part below.
Hope this helps!
ATM Inspection PowerApp to ease ATM inspection and report generation process.
https://www.inkeysolutions.com/microsoft-power-platform/power-app/atm-inspection
Insert data into Many-to-Many relationship in Dynamics CRM very easily & quickly, using the Drag and drop listbox.
http://www.inkeysolutions.com/what-we-do/dynamicscrmaddons/drag-and-drop-listbox
Comply your Lead, Contact, and User entities of D365 CRM with GDPR compliance using the GDPR add-on.
https://www.inkeysolutions.com/microsoft-dynamics-365/dynamicscrmaddons/gdpr
Create a personal / system view in Dynamics CRM with all the fields on the form/s which you select for a particular entity using the View Creator.
http://www.inkeysolutions.com/what-we-do/dynamicscrmaddons/view-creator
© All Rights Reserved. Inkey IT Solutions Pvt. Ltd. 2024
[…] https://www.inkeysolutions.com/blogs/access-sharepoint-online-data-part-1/ […]
Your example for resource/SiteDomain@TenantID should contain only one @.
The @ in the SiteDomain definition should go
Hello Ebo,
Thank you for the information.