web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to authenticate when we call a external WEBAPI from html page in web resources.

(0) ShareShare
ReportReport
Posted on by 25

I have a WEBAPI which is doing DB operations. This WEBAPI needs to be invoked from a HTML page in web resources in CRM. I am invoking the WEBAPI from HTML page using ajax. I need to do authentication for this call.

How can this be achieved?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    You need to retrieve a token, and then add the Authorization header to your request:

    req.setRequestHeader("Authorization", "Bearer " + token);

    If you are managing the credentials yourself, you can convert your credentials to Base64 on client side and re-convert them to string on api side.

    There are other options, all based on the sensitivity of your request, and what data source you are trying to connect with.

    You tags say CRM 2011, so it doesn't seem like you are using CRM Web Api, but your own custom webapi.

    Hope this helps.

  • Suggested answer
    Manmohan Kapoor Profile Picture
    on at

    Please refer the below link ..It's very good article which will help you to solve the WEBAPI problem.

    community.dynamics.com/.../ms-crm-2016-web-api-operations-retrieve-single-or-multiple-records

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans