Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Retrieve Odata web api using plugin

(0) ShareShare
ReportReport
Posted on by 35

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.

Screen-Shot-2022_2D00_11_2D00_30-at-12.16.19-PM.png

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,073 Moderator on at
    RE: Retrieve Odata web api using plugin

    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

  • RE: Retrieve Odata web api using plugin

    Can you provide me an example how to provide the authorization to connect ?

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,073 Moderator on at
    RE: Retrieve Odata web api using plugin

    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.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,387 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans