Reputation: 65
I have been working on something, wherein I have to try and open an existing Office 365 based web-application within Dynamics 365 portal (online). Login into the web-application using the single sign-on provided by Office 365 or the authentication token of the currently logged in user.
To be precise, the operation steps:
I have tried to open the application using a ribbon button, but the Microsoft login pop-up is blocked by Dynamics 365.
I have been browsing various community pages and blogs, but none of them demonstrate the login procedure or a sample code.
If anyone can provide some sample code or some blog or even a direction which demonstrates the same, it will be of great help!
Upvotes: 4
Views: 1958
Reputation: 189
According to your question you have 2 problems
Problem 1
You could create an HTML WebResource and redirect the page using a FORM tag with action to your website with a JS code in the load event. (you will need to communicate with a HTTPS website, otherwise, the browser security will block the invocation)
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" charset="utf-8">
<title>Redirect</title>
<script src="../../../ClientGlobalContext.js.aspx" type="text/javascript">/script>
<script>
$(window).on('load', function () {
$("#FormId").attr('action', "HTTPS://WebSite.COM");
$("#FormId").submit();
});
</script>
</head>
<body>
<form id="FormId>
</form>
</body>
Problem 2
You will need to register your application in the Azure-AD of the Dynamics CRM instance and configurate the Azure-AD authetication in the corresponding WebSite
Hope It Helps
Upvotes: 2