Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)
Under review by Community Managers

Under review

Thank you for your post! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

dynamics v8 web api access from c# application return 401 error

Posted on by 50
I have CRM v8 on premises solution with ADFS server authentication configured. I'm trying to use instance web API https://crmdomain/organization/api/data/v8.2/ from another c# application. I have added application group in ADFS  using this article
 
 
in there when adding resource do we need to add https://crmdomain/organization as resource or https://crmdomain/organization/api/data/v8.2/ ?
 
I can generate access token but I cannot query data from entities tried to add token as bearer token  return 401 unauthorized
 
e.g. https://crmdomain/organization/api/data/v8.2/contacts?$select=firstname,contactid,lastname&$filter=emailaddress1 eq 'valueemailaddress' return data when I browse with correct value in emailaddress. but both my c# coding and postman both return error 401
 
can anyone help me out to sort this please ?

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans