none
Navigating to more than one domain within the same app pane - not working on Excel Online RRS feed

  • Question

  • Hi,

    I have a post similar to: https://social.msdn.microsoft.com/Forums/office/en-US/6ac9b6c5-87d8-4c3c-8039-e04531c49937/redirecting-user-to-login-page-in-task-pane-app?forum=appsforoffice

    And I have also read the article: http://msdn.microsoft.com/EN-US/library/office/jj715716(v=office.15).aspx

    Here is background to the issue we are experiencing:

    We have an Excel Task Pane App. As the app starts up, our App's welcome page is loaded. Once the welcome page has loaded, we need to navigate the location away to a separate page (on a totally different domain) to allow the user to login. Once login is complete, the App is redirected back and the user can then use our app.

    This all needs to happen within the Task Pane.

    This does all happen and works as it should in the desktop version of Excel.

    As soon as we try to use our App on Excel Online, this no longer works. We get to our welcome page, but as soon as we want to redirect to the new page, then it just doesn't.

    I've added the AppDomains to the manifest.

    My manifest looks like this:

    <?xml version="1.0" encoding="utf-8"?>
    <OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:ver="http://schemas.microsoft.com/office/appforoffice/1.0"
    xsi:type="TaskPaneApp">
      <Id>a01cfce7-fa35-4369-a4e6-1a6699199aab</Id>
      <Version>1.0</Version>
      <ProviderName>My Name</ProviderName>
      <DefaultLocale>en-us</DefaultLocale>
      <DisplayName DefaultValue="My App" />
      <Description DefaultValue="My App Description" />
      <AppDomains>
        <AppDomain>mydomain.net</AppDomain>
        <AppDomain>http://mydomain.net/AuthorizationHandler.aspx</AppDomain>
        <AppDomain>https://login.domain.com</AppDomain>
        <AppDomain>https://login1.domain.com</AppDomain>
        <AppDomain>https://login2.domain.com</AppDomain>
      </AppDomains>
      <Capabilities>
         <Capability Name="Workbook"></Capability>
      </Capabilities>
      <DefaultSettings>
        <SourceLocation DefaultValue="http://mydomain.net/Welcome.aspx" />
      </DefaultSettings>
      <Permissions>ReadWriteDocument</Permissions>
    </OfficeApp>

    We really need this to be resolved as soon as possible.

    Thanks,

    Matt

    Thursday, October 30, 2014 2:17 PM

All replies

  • Hi Matt,

    You mean it works fine in desktop Excel application, but not in Excel online, right? Could you please share some of your code here? Especially the code that redirects the page.

    As I'm not quite familiar with Apps for Office, I'm going to involve some other engineers in your case, if there're any updates we'll come back.

    Please be patient, it may take some time.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, October 31, 2014 8:42 AM
    Moderator
  • Hi Caillen,

    Yes, your understanding is correct, Desktop excel is working and redirecting as it should (all within the task pane), but Excel Online does not seem to redirect at all - not even to a new browser window.

    Here is basically what is happening as the Welcome page starts up (JavaScript):

    Office.initialize = function () {
    
    		$(document).ready(function () {
    		Initialize();
    		});
    	};
    	
    function Initialize() {
    	MyWebService.GetUriToRedirectTo(function(requestUri) {
    		window.location.href(requestUri);
    	});
    }



    Friday, October 31, 2014 8:54 AM
  • Hi Sage,

    >> Desktop excel is working and redirecting as it should (all within the task pane), but Excel Online does not seem to redirect at all - not even to a new browser window.

    Technically, Apps for Office is an iFrame element host on Office Web Application. By default, the Office Web Application will use HTTPS protocol (https://xxx-sharepoint.com/xxx). I assume your authorization redirection URL is http://mydomain.net/AuthorizationHandler.aspx. If so, I’m afraid the navigation in the iFrame will not work because the web browser will consider the source of this iFrame is not trusted. To work around this issue, I suggest you using https protocol instead of http protocol.

    Regards,

    Jeffrey


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 4, 2014 7:55 AM
    Moderator
  • Hi Jeffrey,

    Our start-off page is: "http://mydomain.net/Welcome.aspx" and then the redirect is navigating to an https page: https://login.domain.com

    Would this still exhibit the behavior you've mentioned above? Only the app page is not https - but the one it is trying to redirect to is https.

    thanks,

    Matt

    Tuesday, November 4, 2014 8:35 AM
  • Hi Jeffrey,

    So it turns out that the issue is actually that the sign-in website doesn't allow interaction from an iFrame. Are there any elements that they could gain access from within the iFrame in order to use to know that the iframe is a part of Excel Online?

    This could hopefully then be used to check that the iframe is from a "safe source"?

    Thanks,

    Matt

     

    Monday, November 10, 2014 2:51 PM
  • Hi Matt,

    If this issue is caused by “sign-in website doesn't allow interaction from an iFrame”. I suggest you to consider opening a pop-up window for end user to login as a work around.

    Similar Issue: Can not show third party web page - Same Origin Policy

    Regards,

    Jeffrey


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 12, 2014 6:25 AM
    Moderator