Hello,
im trying to retrieve odata web api using plugin using this code below but its not working. the error is: The remote server returned an error: (401) Unauthorized.
Please advise.
in a post I wrote you can find some information on how the authorization works for OData
https://www.crmanswers.net/2022/01/dataverse-web-api-and-rest-client-vs.html
Can you provide me an example how to provide the authorization to connect ?
if you query the same instance inside a plugin you can use IOrganizationService, you don't need to use OData.
If you query another instance then you need to provide the authorization (a bearer token) to connect.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Sahan Hasitha 394
Nimsara Jayathilaka. 123
André Arnaud de Cal... 102 Super User 2025 Season 2