-
Notifications
You must be signed in to change notification settings - Fork 755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling App Service Authentication causes word add-in to open in browser rather than in the task pane. #183
Comments
@davidchesnut Hi David, can you help triage this issue? |
Hi @LiamSolDev, Depending on how you've modified the sample, you'll want to be sure you are using the dialog API for the UI, and not the task pane. See Authenticate and authorize with the Office dialog API for more info. If that's not it, see if you can monitor the network traffic with something like Fiddler. See if there is a difference between the add-in loading online, versus on desktop. Sometimes you can get additional info about what might be getting confused before the page loads. Hope this helps, |
Hi David, Thank you for you help. I am trying to understand what the load order is for the solution so that I can find at what part this authentication is called and is opening in the browser. I have re-added the functionality to the SSOAuth and SSOAuthES6 as these appeared to be loaded first but this has not been enough- is the authentication for the web app checked before this? |
@LiamSolDev Your symptoms remind me of the first 2 paragraphs of this section in the docs: Specify domains you want to open in the add-in window. After reading that, I suggest that you use the Fiddler tool, as David suggested, to determine what domain the add-in is trying to open and add that domain to the If that doesn't fix it, then some questions:
|
@LiamSolDev I can't find that "App Service ... " UI on my Authentication page. Different kinds of subscriptions in Azure can have variant UIs. Can you please give me the step-by-step procedure you use to get that UI on the screen? |
Hi Rick,
This is on the App Service that is hosting the application so that it is web accessible.
I set up the app service with the following options:
* Publish: Ensure Code is Selected
* Runtime stack: Node 12 LTS
* Operating System: Windows
Though we have seen the same Authentication screen on both windows and linix.
Once on the app service - select "Authentication (Classic)" and turn it on with either azure or Microsoft account validation.
![image](https://user-images.githubusercontent.com/44843976/125910771-831fd03d-2ba1-4d6e-a7b0-67290115ea97.png)
Thank you.
…________________________________
From: Rick Kirkham ***@***.***>
Sent: 15 July 2021 19:18
To: OfficeDev/PnP-OfficeAddins ***@***.***>
Cc: Liam Dick ***@***.***>; Mention ***@***.***>
Subject: Re: [OfficeDev/PnP-OfficeAddins] Enabling App Service Authentication causes word add-in to open in browser rather than in the task pane. (#183)
@LiamSolDev<https://github.com/LiamSolDev> I can't find that "App Service ... " UI on my Authentication page. Different kinds of subscriptions in Azure can have variant UIs. Can you please give me the step-by-step procedure you use to get that UI on the screen?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#183 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKWEHSDQXCEY7KDKRFJCMVDTX4RA3ANCNFSM47U5IVUQ>.
|
@LiamSolDev OK. I understand what you mean now. (I was thinking of "App Service" in a different sense.) I'll see if I can find someone who can help with this. |
Hi Rick, This is on a deployed app being hosted on an Azure App Service with the following settings. From the Azure Portal, search at the top for "App Services" and select it. Kind Regards, |
Hi Liam, Checking with our team it looks like you can see this behavior (popping out into a separate browser) when your add-in gets a redirection to a domain that is neither a subdomain of your SourceLocation nor a domain listed under your AppDomains. I also notice in your Fiddler trace the protocol is HTTP. You must use the HTTPS protocol for any auth scenarios. Cheers, |
Hi @LiamSolDev, Thanks for that screen shot as it is super helpful. You need to specify the protocol and port as well, for example Hope this helps, |
Hi @LiamSolDev, I tried setting up a simple ASP.NET server just to try out the app service authentication with similar settings as yours. I tested just browsing to the home HTML page to see how it would act. It redirects to a login page. I believe this may be what you are seeing.
You should be able to test this by opening a browser window and loading your task pane HTML page (or any other resource) using the URL. If you see the request redirect, that behavior will not work with Office. Logins (and redirects) need to always be handled through the dialog API. If you can't configure app service authentication to not redirect on some requests (like the HTML page) it's not going to work with Office add-ins. Cheers, |
Hi David, Thank you and @Rick-Kirkham for all of your help so far :) So to confirm do you believe that it is not possible to get this working within an office add-in or do you think it could be managed through the dialog API (not something I am familiar with), but since the redirect is happening before any code loads I am not confident that we could make use of any code based solution. I do not see any setting available to us to make the authentication page by page based as it is a whole solution issue. I know that you and Rick have been heavily involved in the development of this and the development of the tutorials but we have been asked by our client to raise a ticket with Microsoft to confirm that turning this option on will not work before we proceed- I am unclear on this but do you work for Microsoft and do you know the best option to get in touch with Microsoft about this specific issue? We tried looking at the support within the Microsoft partner centre but this makes mention to an "Offer ID", "Offer Type" and "Offer Name" none of which we can fill in. This is become a major blocker for a development we have invested a lot of time on and we can only move forward by either resolving the issue or proving with contact from Microsoft (clients request) that it is not possible- any assistance you provide will be greatly appreciated. |
Hi @LiamSolDev, Kind of a lot to try to answer here. :-) Yes Ricky and I work for Microsoft on the Office Add-ins team doing docs, samples, tutorials, and working with the rest of the engineering team. You're reaching out to a good source. I've been consulting with the engineering team as we go along.
Hope this helps, |
Hi David, Thank you again for all your assistance. Is there anywhere I can go to write a review or give you a +1 :) You two deserve it! Time to get back to programming rather than bug fixing- thank you for all your support. |
Hi @LiamSolDev, |
Enabling App Service Authentication causes word add-in to open in browser rather than in the task pane.
At client request we have enabled the App Service Authentication (Classic), setting screenshot bellow.
![image](https://user-images.githubusercontent.com/44843976/124145393-a8f37d80-da84-11eb-97c5-f8b0a06d37a5.png)
Our application still runs within the online version of word with no issue however the desktop version of the app immediately attempts to open the word add-in in the browser for what I assume is authentication and shows nothing in the task pane.
Inspection of the task pane shows that no html is loaded before the authentication check
Is this something you have encountered before? or got a solution for?
Task Pane Working Online:
![image](https://user-images.githubusercontent.com/44843976/124146648-e1e02200-da85-11eb-9868-11b787fc49e9.png)
Task Pane On Desktop:
![image](https://user-images.githubusercontent.com/44843976/124146718-f2909800-da85-11eb-8955-6390dca574b7.png)
Browser Window Opened By Desktop Taskpane:
![image](https://user-images.githubusercontent.com/44843976/124146810-0a681c00-da86-11eb-9a1e-d9de52a891d1.png)
The text was updated successfully, but these errors were encountered: