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:
-
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.
-
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:33333or the callback URL used in CData.
-
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.
-
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.
-
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¶
Discussed in the community
Looking for related questions…
Didn't find your answer? Ask the community about this page — questions are answered by Timextender experts, partners and other users.