How do I test Office js add-ins using SSO with localhost?

Clare 0 Reputation points
2024-04-03T21:04:44.52+00:00

Hi, I'm following the instructions in

https://learn.microsoft.com/en-us/office/dev/add-ins/develop/use-sso-to-get-office-signed-in-user-token?tabs=yooffice

to set up a office-js addin using SSO. When I get to the "Expose an API" step, I'm unable to set the ID to api://localhost:[port]/[app-id-guid], because Azure is hard-coding https://mydomain.com/ at the start of the URL. I can't therefore set it to use localhost:3000. And when trying to test SSO locally, I have to use localhost:3000 to match the domain of the addin!

How do I either (a) configure Azure to use localhost, or (b) configure the manifest to not require localhost when running in dev ?

Microsoft 365 and Office Development Other
0 comments No comments
{count} votes

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.