OfficeDev / Office-Addin-Scripts

A set of scripts and packages that are consumed in Office add-ins projects.
MIT License
153 stars 93 forks source link

office-addin-sso doesn't detect Azure CLI on the system and attempts to install it every time the configure command is run #808

Closed matyasdanko closed 5 months ago

matyasdanko commented 9 months ago

Prerequisites

Please answer the following questions before submitting an issue.

Expected behavior

Running npm run configure-sso in the terminal begins the process for configuring SSO for an Outlook add-in.

Current behavior

Running npm run configure-sso (shorthand for office-addin-sso configure manifest.xml) doesn't detect Azure CLI on the system and upon execution attempts to download the installer and install it. After the installer is closed the execution of the script ends. This behavior doesn't change even after multiple reboots, reinstallation of Azure CLI regardless of whether the 32/64-bit version or both are installed, and regardless of whether the terminal is run with administrator privileges or not. Azure CLI runs in any terminal just fine.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Generate a new add-in project using Yeoman's "Office Add-in Task Pane project supporting single sign-on" template using JavaScript.
  2. Install Azure CLI
  3. run npm run configure-sso

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Failure Logs

I've tried executing the command in both PowerShell and Windows cmd. Output after running npm run configure-sso:

office-addin-taskpane-sso-js@0.0.0 configure-sso office-addin-sso configure manifest.xml Azure CLI is not installed. Installing now before proceeding - this could take a few minutes.

exextoc commented 7 months ago

Thanks for reporting this issue regarding the configure-sso script. It has been put on our backlog. We unfortunately have no timelines to share at this point.

Internal tracking id: Office: 8559427

davidchesnut commented 7 months ago

FYI I created a PR here that should fix this issue: #821

millerds commented 5 months ago

Fix should be pushed out in recent version of office-addin-sso.