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
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
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156