A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation
Office Add-in SSO deployed to Azure App Service Tutorial Fail -> returns 404 on GetMyProfile call
What I need help with
I need help building a simple add-in on excel web that can sign a user, get consent to access the excel file the add-in is deployed on to get a token, and have a backend in python that uses the token to read/write to the excel sheet using GRAPH API.
What I've done
To do so, I followed this Microsoft Guide, Deploy a single sign-on (SSO) Office Add-in to Microsoft Azure App Service, to create a working project. However, the tutorial doesn't lead into a working project.
I can get the project working on my machine using localhost:3000 (I can click “Get My User Profile Information” and get back my AAD profile). But once I deploy the same code (the dist/ folder plus manifest) to an Azure App Service and update the manifest’s SourceLocation/WebApplicationInfo URLs accordingly, the profile call fails.
One problem that I already identified is that if you deploy the App Service app in the tutorial on a Linux server, the app doesn't boot up. However, if you deploy it on a windows server it at least boots up and I can successfully, deploy the app on Excel Web, by uploading the manifest.xml. Even then, after pressing the "Get My User Profile Information" I get the following issue:
EXCEPTION: {"readyState":4,"responseText":"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.","status":404,"statusText":"Not Found"}
Steps I followed
- Ran ``` yo office` `` and built a working add-in with SSO on localhost by following this tutorial "Single sign-on (SSO) quick start"
- Created a Windows-based Azure App Service and deployed the contents of
dist/ - Updated manifest’s
<SourceLocation>and<WebApplicationInfo>to point at the new URL - Updated Azure AD app registration’s redirect URI to match based on " Deploy a single sign-on (SSO) Office Add-in to Microsoft Azure App Service"
- Uploaded new manifest to Office 365 admin center
Reproduce the error
- The entire code base, including the built dist/ folder that is deployed on Azure App Service, with manifest.xml file deployed on Excel web, is on this GitHub repo.
- The manifest.xml file is here
- This link shows that the App Service is running successfully
- You can side-load the manifest.xml file on Excel Web to see the error when you press on "Get My User Profile Information”
Can someone please help me get a functional design or at least tell me if there is a better way of me achieving my goal? I've added a few screenshots of the error along with my App Registration.