How can I avoid the dialog box "An add-in is trying to open this application [Cancel][Open][Cancel]" when I open a protocol link from the office add-in?

Dwnl-3653 10 Reputation points
2023-12-18T19:44:57.0333333+00:00

If a protocol link is opened from an Office.JS add-in then a popup "THIS ADD-IN IS TRYING TO OPEN 'APP1'" is shown, with 2 "Cancel" buttons an "Open" button and a checkbox "Always remember my choice for this application." which doesn't work.

Questions:

  1. Is it possible to avoid this popup?
  2. When will this popup be fixed?

Steps to reproduce the issue:

  1. Build the Excel add-in Quick start project: https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/excel-quickstart-jquery?tabs=yeomangenerator
  2. In manifest.xml change: <Action xsi:type="ShowTaskpane"> <TaskpaneId>ButtonId1</TaskpaneId> <SourceLocation resid="Taskpane.Url"/> </Action> to: <Action xsi:type="ExecuteFunction"> <FunctionName>myFunc</FunctionName> </Action>
  3. In commands.js add the following code lines at the beginning of the file:

Office.actions.associate('myFunc', myFunc); async function myFunc(event) { window.location = "app1://arg1/arg2"; event.completed(); }

  1. Start the add-in and click the button.
Microsoft 365 and Office Development Other
{count} vote

1 answer

Sort by: Most helpful
  1. Manish Shah 0 Reputation points
    2024-02-26T18:56:28.7666667+00:00

    We are facing exactly the same issue. Has anyone found the solution to the problem? if so please share. Thank you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.