How to fix the below issue when connecting to Share point Online from Hadoop Onprem

Sankaralingam.DhilipanSomasundaram 40 Reputation points
2023-12-18T21:12:04.74+00:00

We are provided with Sharepoint Online URL(list) and its Credentails(Client Id and Secret key) to connect from Hadoop Onprem to Sharepoint Online.

Error:
office365.runtime.client_request_exception.ClientRequestException: ('-2147024891, System.UnauthorizedAccessException', 'Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))', "403 Client Error: Forbidden for url: _____"

Why it is happening? and what to do to fix this issue

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

Accepted answer
  1. Xyza Xue_MSFT 30,176 Reputation points Microsoft External Staff
    2023-12-19T02:32:21.3566667+00:00

    Hi @Sankaralingam.DhilipanSomasundaram ,

    This error message indicates that the user account you are using to connect to SharePoint Online does not have the necessary permissions to access the resource you are trying to reach .

    There could be several reasons why this error is occurring. Here are some possible causes and solutions:

    1. Incorrect credentials: Ensure that the client ID and secret key provided are correct and valid . You can also try regenerating the client ID and secret key and retrying the connection .
    2. Insufficient permissions: Check if the client ID and secret key have sufficient permissions to access the SharePoint Online URL . You can also try granting the client ID and secret key the necessary permissions to access the SharePoint Online URL .
    3. Firewall or proxy settings: Check if there are any firewall or proxy settings that are blocking the connection . You can also try disabling the firewall or proxy settings and retrying the connection .
    4. Incorrect URL: Ensure that the SharePoint Online URL provided is correct and valid . You can also try using a different URL and retrying the connection .

    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.


0 additional answers

Sort by: Most helpful

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.