Skip to main content

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

 

Be the first to reply!

Reply