Hello Doug Appleyard,
Thanks to the inputs you provided, we've been able to successfully reproduce the observations and find below along with screenshots:
- You need to ensure you are using node.js 18.x, not the current LTS (20.x), or the configure-sso command will fail.
The current LTS (20.x) supports and can configure SSO without encountering any failures.
- The current version of yeoman is 5.0, but I installed 4.x as specified by this exercise.
The current version of Yeoman 5.0 is functioning well, and versions higher than 4.x will work without any errors. Versions are specified at the time of document/unit preparation.
- You need to run "npm install" in the project directory before running "npm run configure-sso" or the configure-sso command will fail.
NPM is installed automatically along with Node.js, eliminating the need for separate installation.
- You need to install Azure CLI or configure-sso will fail.
You can execute the commands in the command terminal/powershell/CLI without requiring any additional tools.
- You need to remove the azure directory from your home directory (if you are using a new or different Microsoft username for testing purposes).
You can skip the step mentioned above as it is unnecessary if you are in correct azure directory. You can switch directory or sign-out from all other azure accounts to avoid confusion.
- After the above fixes and workarounds, the app was successfully registered in Azure. But now "npm start" fails.
If you completed the steps above as shown in the documentation or video, you should register the app from the Azure portal. Make sure to do this with administrator privileges and enable the necessary app permissions.
- You need to create an empty index.js file in the src directory, or "npm start" fails with many errors.
You don't have to create any extra files apart from those mentioned in the documentation. "npm start" is not required at this stage.
8. From "Explore the project", file src/taskpane/taskpane.html does not exist, and neither does taskpane.js.
Files will only be present in the specified folder if the commands are executed without any errors.
- There are only two files in src/taskpane, one for Excel and one for Outlook, but this is a Word exercise.
When you run the command "yo office," make sure to select "Word" if you're working with Word tasks. Selecting other options like Outlook or Excel will result in an error.
- npm start" is unable to start the dev server.
- "npm start" is unable to start debugging.
- "npm start" is unable to sideload the Office Add-in.
Running 'npm start' allows you to initiate the development server, debug, and load the Word sideload add-in as shown in below screenshot.
- "npm start" says Excel is not supported, but this is a Word exercise.
These commands are tailored for Word only. If you wish to perform tasks for Excel, you can easily replace 'Word' with 'Excel' in the commands.
Ref video: https://www.youtube.com/watch?v=kf_VMt_Eh0M Ref documentation links:
- https://learn.microsoft.com/en-us/training/modules/office-add-ins-sso/3-exercise-word-sso
- https://learn.microsoft.com/en-us/office/dev/add-ins/develop/create-sso-office-add-ins-nodejs#register-the-add-in-with-azure-ad-v20-endpoint
- https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/sso-quickstart?source=recommendations
Note: Please ensure that no networks or devices are in restricted mode to obtain results without encountering any errors. If you're using Node.js version 20.0.0 or later, you may see a warning when the generator runs the installation that you have an unsupported engine. We're working on a fix for this. In the meantime, the warning doesn't affect the generator or the project you generate, so it can be ignored.
Hope the above information can help.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".