Office 365 SSO: Unable to set tenant reply urls bad request for yeoman starter example

Georg Heiler 1 Reputation point
2022-10-24T14:30:48.55+00:00

I am trying to follow along the yeoman office SSO example from https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/sso-quickstart with an Azure developer instant sandbox (https://developer.microsoft.com/en-us/microsoft-365/dev-program). However, I am runnign into issues:

   office-addin  
   Failed to run az ad app permission admin-consent --id <<id>>:   
   ERROR: Bad Request({"ClassName":"Microsoft.Portal.Framework.Exceptions.ClientException","Message":"Graph call failed with httpCode=BadRequest, errorCode=Request_BadRequest, errorMessage=It looks like the application '<<id>>' you are trying to use has been removed or is configured to use an incorrect application identifier., reason=Bad Request, correlationId = <<correlation_id>>, response = {\"odata.error\":{\"code\":\"Request_BadRequest\",\"message\":{\"lang\":\"en\",\"value\":\"It looks like the application '<<id>>' you are trying to use has been removed or is configured to use an incorrect application identifier.\"},\"requestId\":\"<<request id>>\",\"date\":\"2022-10-24T14:24:28\"}}","Data":{},"HResult":-<<hrresult>>,"XMsServerRequestId":null,"Source":null,"HttpStatusCode":400,"ClientData":{"errorCode":"Request_BadRequest","localizedErrorDetails":{"errorDetail":"It looks like the application '<<id>>' you are trying to use has been removed or is configured to use an incorrect application identifier."},"operationResults":null,"timeStampUtc":"2022-10-24T14:24:28.5191627Z","clientRequestId":"<<correlation_id>>","internalTransactionId":"<<transaction id>>","tenantId":null,"userObjectId":"<<user object id>>","exceptionType":"AADGraphException"}})  
     
       Attempt 6  
   Consent granted  
   node_modules/office-addin-sso/lib/configure.js:289  
               throw new Error(errorMessage);  
                     ^  
     
   Error: Unable to set tenant reply urls.   
   ERROR: Bad Request({"error":{"code":"Request_BadRequest","message":"Invalid object identifier 'undefined'.","innerError":{"date":"2022-10-24T14:24:34","request-id":"<< reuquest id >>","client-request-id":"<< client request id>>"}}})  

Please can you help me to debug/fix these.

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,839 questions
{count} votes

1 answer

Sort by: Most helpful
  1. JamesTran-MSFT 36,596 Reputation points Microsoft Employee
    2022-10-24T18:38:34.05+00:00

    @Georg Heiler
    Thank you for following up on this and I'm glad that you were able to resolve your issue!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution in case you'd like to "Accept" the answer.

    Issue:
    After following the Single sign-on (SSO) quick start documentation, you ran into the below error message. The issue was that you tried to execute the script npm run configure-sso and logged in with the demo admin account.

    Error Message:
    It looks like the application '<<id>>' you are trying to use has been removed or is configured to use an incorrect application identifier.

    Solution:
    You resolved this by adding a M365 tenant and logging in with your real account.

    Thank you again for your time and patience throughout this issue.

    ----------

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    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.