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)

Embed and authenticate ASP.NET MVC Application inside an IFRAME

(0) ShareShare
ReportReport
Posted on by 120

I have a complex web application that makes calls to the SDK that need to be shown as an IFRAME inside CRM.

Currently, my application connects to CRM using a hardcoded System User. My client wants the application to execute all CRUD operations under the logged-in user and not using one static System User. For example, when the WhoAmIRequest is called, it should return the Id of the logged-in user.

I thought of showing a custom login page inside the web application to capture the credentials, however, this approach is not acceptable.

I need to find a solution to authenticate inside the web application rather than asking for the credentials.

Is this is possible? 

NOTE: I thought of changing my web application to behave as a Web API and be consumed from HTML pages, as I said before, the application is too complex and I needed to use MVC and Razor views.

Another question, the application also needs to connect to SharePoint to create files, is it possible to use the logged user? my code uses Microsoft.SharePoint.Client.ClientContext class.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    One way I can think of is to pass the user id to the Iframe context (have to enable cross site scripting), then get the user id from querystring and do the WCF impersonation.

    msdn.microsoft.com/.../gg309629(v=crm.6).aspx

    Not so sure about SharePoint, you need to check the SharePoint SDK for the impersonation.

  • Verified answer
    Ahmad Anwar Profile Picture
    120 on at

    The solution to my problem, as you said, by using Impersonation AND implementing Server-to-Server Authentication.

    msdn.microsoft.com/.../mt790171.aspx

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