Forum Discussion
trying to get access token using sharepoint onpremise api but getting error in first step
Hi Jerror,
If you are getting the "401 Unauthorized" error, you can try:
1. Check if the owner account has the necessary permissions:
- Make sure that the owner account used for authentication has the appropriate permissions to access the SharePoint resources and perform the desired API actions.
- Verify that the owner account has full control (or the required permissions)
2.Ensure the SharePoint on-premises environment is configured for OAuth:
- Verify that the SharePoint 2016 on-premises environment has been properly configured to support OAuth authentication.
3. Confirm the URL and parameters:
- Double-check the URL you are using to request the access token and ensure it is correctly formatted and matches the SharePoint on-premises environment.
- Verify that all required parameters, such as client_id, redirect_uri, and other necessary parameters, are included and correctly specified in the request URL.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Kindest regards
Leon Pavesic
- JerrorJul 07, 2023Copper Contributor
Hi LeonPavesic
Still, we are getting the same error
We checked all things, we tried from the admin account - JerrorJul 06, 2023Copper Contributor
Thank you LeonPavesic for your response we will check and get back to you.