Hi @Zaheer. Sadaf (Enterprise Services)
Yes, you need to provide permissions to the SharePoint service you want to consume using the REST API. These permissions determine what actions you can perform on the service.
There are two main ways to provide permissions:
- App-only permissions:
Use this method when you want to create an application that will interact with SharePoint on behalf of a user
Need to register your application with Azure AD and provide it with the necessary permissions. - User context permissions: Use this method when you want to perform actions on SharePoint using the credentials of a specific user.
Need to get an access token for the user using their credentials and include it in your REST API requests. I hope this helps! Please mark as "Accept the answer" if the above steps helps you. Your suggestion will help others!