none
Completing forms authentication process via MS-OFBA within Office app RRS feed

  • Question

  • Hello,

    I'm currently working on a custom WebDAV server that I would like to extend by implementing the Office Forms Based Authentication Protocol (MS-OFBA) for better integration with Office apps (namely to get around Office apps prompting the user for authentication every time when using Basic authentication).

    I have it mostly working currently. The Office app (Word 2013 in this case) successfully gets redirected to my login.aspx page which opens the login form in a new window. Entering credentials successfully authenticates the user, sets the required cookie, and is redirected to my OnSuccess.aspx page. The problem is at this point, the Office app just sits there with the form window open with whatever the contents of OnSuccess.aspx are (in this case a blank page that just returns 200 OK). I can manually close the window via the X button, and then the app successfully loads the initially requested file.

    I'm trying to figure out how to get the login window to close automatically (basically get the Office app to recognize that the authentication redirects are complete)

    I've tried adding javascript to the OnSuccess page that closes the current window, but that just made a popup appear asking me to allow closing the window. Clicking "Yes" didn't actually make the window close.

    I've also tried redirecting back to the initial request page instead of an OnSuccess.aspx page, but that just makes the app send a GET request and load the response in the login form window.

    Thanks


    • Edited by Skrzyp Tuesday, October 28, 2014 6:09 PM
    Tuesday, October 28, 2014 6:05 PM

All replies

  • Hi Skrzyp,

    Thanks for posting in MSDN forum.

    I'm trying to involve some senior engineers into this issue and it will take some time. Your patience will be greatly appreciated.

    Sorry for any inconvenience and have a nice day!

    Best regards

    Fei 


    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.

    Thursday, October 30, 2014 8:55 AM
    Moderator
  • Hello

    I'm suffering from the same issue as Skrzyp. After the user has logged in using the form that has been shown by Microsoft Office 2013, using my HTML form, the dialog stays open and if I close it manually the document opens in read only mode.

    What do I have to do to assure that Word will close the dialog on its own?

    Regards

    Martin

    Friday, April 17, 2015 9:51 AM
  • Hello,

    the same problem - but only when the URL contains spaces. When just the document name contains spaces the window normally disappears.

    So we probably need to encode spaces in a different manner (not by converting to %20)... or to fix MS Office ?

    Thanks

    Wednesday, February 24, 2016 2:46 PM
  • Solution:  use HttpApplication.Server.UrlPathEncode() function or another appropriate function for the ReturnUrl parameter in MS-OFBA headers.

    • Proposed as answer by liborii Thursday, February 25, 2016 1:05 PM
    Thursday, February 25, 2016 1:05 PM
  • Just to follow up on my original question; you have to make sure the urls match exactly. In my case, I was sending the port number in the url as well. When this was a default port (http 80, or https 443) Office would strip it from the url. This would cause its url to not match the original, and the dialog would remain open.

    Ex. I redirect to https://domain.com:443/OnSuccess.aspx, but Office views this as https://domain.com/OnSuccess.aspx which messes up the string comparison.

    My solution was to not add the port number to the url if using a default port.

    Thursday, February 25, 2016 3:27 PM