Setting up Sharepoint connector with User Principal Name

Summary

The user is facing an issue setting up a Sharepoint connector and is unsure about the value to use for the ‘User Principal Name’. The error indicates a ‘404 Client Error: Not Found’ related to user not found in the Microsoft Graph API.


Question

Hi,

Can anyone help me with setting up a Sharepoint connector? I have the client ID, Client secret and the tenant ID but I do not know what value I should use for the “User Principal Name”?

I am getting the error below when trying to create the source:

[‘Traceback (most recent call last):\n File “/usr/local/lib/python3.9/site-packages/office365/runtime/client_request.py”, line 38, in execute_query\n response.raise_for_status()\n File “/usr/local/lib/python3.9/site-packages/requests/models.py”, line 1021, in raise_for_status\n raise HTTPError(http_error_msg, response=self)\nrequests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://graph.microsoft.com/v1.0/users/airbyte/drive\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File “/airbyte/integration_code/source_microsoft_sharepoint/utils.py”, line 51, in execute_query_with_retry\n return obj.execute_query()\n File “/usr/local/lib/python3.9/site-packages/office365/runtime/client_object.py”, line 52, in execute_query\n self.context.execute_query()\n File “/usr/local/lib/python3.9/site-packages/office365/runtime/client_runtime_context.py”, line 183, in execute_query\n self.pending_request().execute_query(qry)\n File “/usr/local/lib/python3.9/site-packages/office365/runtime/client_request.py”, line 42, in execute_query\n raise ClientRequestException(*e.args, response=e.response)\noffice365.runtime.client_request_exception.ClientRequestException: ('ResourceNotFound', 'User not found', '404 Client Error: Not Found for url: https://graph.microsoft.com/v1.0/users/airbyte/drive')\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/file_based/availability_strategy/default_file_based_availability_strategy.py”, line 81, in _check_list_files\n file = next(iter(stream.get_files()))\n File “/airbyte/integration_code/source_microsoft_sharepoint/stream_reader.py”, line 143, in get_matching_files\n files = self._get_files_by_drive_name(self.drives, self.config.folder_path)\n File “/airbyte/integration_code/source_microsoft_sharepoint/stream_reader.py”, line 131, in drives\n my_drive = execute_query_with_retry(\n File “/airbyte/integration_code/source_microsoft_sharepoint/utils.py”, line 75, in execute_query_with_retry\n raise AirbyteTracedException.from_exception(ex, message=“Caught unexpected exception”)\nairbyte_cdk.utils.traced_exception.AirbyteTracedException: ('ResourceNotFound', 'User not found', '404 Client Error: Not Found for url: https://graph.microsoft.com/v1.0/users/airbyte/drive')\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/file_based/availability_strategy/default_file_based_availability_strategy.py”, line 62, in check_availability_and_parsability\n file = self._check_list_files(stream)\n File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/file_based/availability_strategy/default_file_based_availability_strategy.py”, line 87, in _check_list_files\n raise CheckAvailabilityError(FileBasedSourceError.ERROR_LISTING_FILES, stream=stream.name) from exc\nairbyte_cdk.sources.file_based.exceptions.CheckAvailabilityError: Error listing files. Please check the credentials provided in the config and verify that they provide permission to list files. Contact Support if you need assistance.\nstream=leo stream\n’]



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want
to access the original thread.

Join the conversation on Slack

["setting-up", "sharepoint-connector", "user-principal-name", "404-error", "microsoft-graph-api"]