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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans