Error connecting to Sharepoint using pyairbyte

Summary

The user is facing an error while trying to connect to Sharepoint using pyairbyte. The error message indicates a 404 Client Error: Not Found for the Microsoft Graph API endpoint.


Question

I am trying to use pyairbyte to connect to Sharepoint. I have completed all the setup as mentioned in step 1 till admin consent. https://docs.airbyte.com/integrations/sources/microsoft-sharepoint
I have also uploaded a csv (storage_cost.csv) file on Sharepoint under Documents folder.
I checked the connectivity as below:

import json

def main():
    # Set up the SharePoint source connector
    sharepoint_source = ab.get_source(
        "source-microsoft-sharepoint",
        install_if_missing=True,
        config={
            "start_date": "2024-01-01T00:00:00.000000Z",
            "credentials": {
                "auth_type": "Client",
                "tenant_id": "ABC.onmicrosoft.com",
                "client_id": "skdjfdsjkdsnv",
                "client_secret": "ksdjfkdjfkjdfkjdlkejje90"
            },
            "site_url": "<https://ABC.sharepoint.com/sites/Airbyte-test-site>",
            "folder_path": "Documents",
            "streams": [
                {
                    "name": "storage_cost",
                    "format": {
                        "filetype": "csv",
                        "delimiter": ",",
                    }
                    # "globs": ["storage_cost.csv"],
                    # "validation_policy": "Emit Record"
                }
            ]
        }
    )
    # Validate the SharePoint configuration
    check_result = sharepoint_source.check()
    if check_result.status != "SUCCEEDED":
        print(f"Check failed: {check_result.message}")
        raise Exception("SharePoint configuration is invalid")

    print("Connection is established")
    # stream_list = sharepoint_source.get_available_streams()
    # print(stream_list)

    # Read data from SharePoint and load it into Snowflake
    sharepoint_source.select_all_streams()
    result = sharepoint_source.read()
    print(result)

    print("Data ingestion completed successfully")

if __name__ == "__main__":
    main()```
I get the following error.
check
    raise exc.AirbyteConnectorCheckFailedError(
airbyte.exceptions.AirbyteConnectorCheckFailedError: AirbyteConnectorCheckFailedError: Connector check failed.
404 Client Error: Not Found for url: <https://graph.microsoft.com/v1.0/>...
Would be great if anyone to could help. Thanks.

<br>

---

This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C021JANJ6TY/p1722313140763579) if you want 
to access the original thread.

[Join the conversation on Slack](https://slack.airbyte.com)

<sub>
["pyairbyte", "sharepoint", "microsoft-graph-api", "connector-error", "404-error"]
</sub>