Skip to main content

Error "401 Unauthorized" while Connecting to Microsoft Dataverse using TimeXtender OData Data Source


Symptoms

Error while connecting to Microsoft Dataverse using TimeXtender OData data source. Error Message received:

Error: 401 Unauthorized.

Resolution

To resolve the issue of connecting to Microsoft Dataverse using the TimeXtender OData data source, follow these steps:

  1. Configure the OData Data Source:

  • Open the TimeXtender Portal and select the Ingest Instance.
  • Define the necessary authentication settings for the data source.
  • Provide the URL to the OData metadata discovery EDMX file. For example: https://yourorg.api.crm.dynamics.com/api/data/v9.2/$metadata.
  • Click the Configure button to open the Metadata discovery modal.
  • In the modal, select the endpoints and possible expansions you want to configure.
  • Click Submit to return to the data source configurations.
  1. Authentication Setup:

  • Ensure you have registered an app in Azure under "App Registrations".
  • Use the following URLs for authentication:
    • Auth URL:

      https://login.microsoftonline.com//oauth2/authorize?resource=https://.api.crm4.dynamics.com
    • Client ID:

      The client ID used in CData.
    • Callback URL:

      Use http://localhost:33333 or the callback URL used in CData.
  1. Testing with Postman:

  • Use Postman to test the connection by entering the Auth URL and other required parameters.
  • Obtain the bearer token and use it to configure the connection in TimeXtender.
  1. Minimum Permissions:

  • Assign the Azure app the "System Administrator" role in the Power Platform environment to ensure it has access to Dataverse.
  • Ensure the app has the necessary permissions, such as user_impersonation.
  1. Endpoint Configuration:

  • Use the base URL format: https://yourorg.api.crm.dynamics.com/api/data/v9.2.
  • Add the specific endpoints, such as accounts, to fetch data from the respective tables.

Reference Ticket

33948

Reference Links

TimeXtender OData Data Source

 

Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings