Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Replicate CRM xRM API on Portals

(0) ShareShare
ReportReport
Posted on by

I am trying to replicate that API with a portal address like:

https://my-company.crm.dynamics.com/api/data/v9.0/

When you navigate to that URL you get all your entities information thanks to xRM API.

Now If you add the entity plural name like: https://my-company.crm.dynamics.com/api/data/v9.0/roles then you see all the related info to that entity.

Then I thought in creating the same URL accessible from customer portals, so I have created a web template with an AJAX function like:

const subs = location.pathname.substr(location.pathname.indexOf('api')+3, location.pathname.length) + location.search;

fetch('my-company.crm.dynamics.com/.../v9.0' + subs)
.then(response => response.json());


But I realized that whenever I navigate to the new API URL like my-portal.microsoftcrmportals.com/api I get everything is ok. But if I navigate to  https://my-portal.microsoftcrmportals.com/api/roles I get error 404.

How would you fix this? Thanks in advance

*This post is locked for comments

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Replicate CRM xRM API on Portals

    Hi,

    Why do you want to replicatet this when you can retrieve the data using the inbuilt odata feeds?

    Check below links-

    arpitmscrmhunt.blogspot.com/.../adxstudio-portal-how-to-use-odata.html

    community.dynamics.com/.../using-entity-list-as-odata-feed-dynamics-365-portal

    Hope this helps.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans