Authenticating Web App with access token returns a HTML response

%3CLINGO-SUB%20id%3D%22lingo-sub-1588944%22%20slang%3D%22en-US%22%3EAuthenticating%20Web%20App%20with%20access%20token%20returns%20a%20HTML%20response%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1588944%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20a%20web%20app%20that%20is%20registered%20in%20the%20Azure%20AD%20and%20user%20are%20able%20to%20access%20the%20app%20with%20their%20AD%20account.%20The%20app%20has%20API%20as%20well%20that%20we%20want%20to%20get%20the%20response%20but%20this%20time%20an%20integration%20using%20Access%20Token%2C%20we%20are%20able%20to%20get%20the%20access%20token%20via%20postman%20provided%20secret%2C%20client%20id%20and%20tenant%20id%2C%20etc.%20following%20from%20this%20document%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fauth-v2-user%23%3A~%3Atext%3DAzure%2520AD%2520will%2520sign%2520the%2Cendpoint%2520for%2520an%2520access%2520token.%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fauth-v2-user%23%3A~%3Atext%3DAzure%2520AD%2520will%2520sign%2520the%2Cendpoint%2520for%2520an%2520access%2520token.%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20when%20we%20try%20to%20use%20the%20Access%20Token%20in%20Postman%20with%20the%20web%20app%20it%20only%20returns%20the%20login%20html.%20Same%20URL%20when%20we%20access%20to%20browser%2C%20after%20login%20using%20AD%20user%20it%20returns%20a%20json%20response.%3C%2FP%3E%3CP%3EIs%20there%20something%20I%20missed%20in%20the%20document%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222020-08-14_20-38-57.png%22%20style%3D%22width%3A%20709px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212403iA064061C513DD226%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%222020-08-14_20-38-57.png%22%20alt%3D%222020-08-14_20-38-57.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222020-08-14_20-41-42.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212406i23BD61FF9300F593%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%222020-08-14_20-41-42.png%22%20alt%3D%222020-08-14_20-41-42.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1588944%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWeb%20Apps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2028692%22%20slang%3D%22en-US%22%3ERe%3A%20Authenticating%20Web%20App%20with%20access%20token%20returns%20a%20HTML%20response%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2028692%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F757983%22%20target%3D%22_blank%22%3E%40orchidc%3C%2FA%3E%26nbsp%3BHi!%20Faced%20same%20issue.%20How%20did%20you%20fix%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2222603%22%20slang%3D%22en-US%22%3ERe%3A%20Authenticating%20Web%20App%20with%20access%20token%20returns%20a%20HTML%20response%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2222603%22%20slang%3D%22en-US%22%3EI%20am%20getting%20the%20same%20error.%20Have%20you%20solved%20it%20%3F%3C%2FLINGO-BODY%3E
Frequent Visitor

Hi All,

 

We have a web app that is registered in the Azure AD and user are able to access the app with their AD account. The app has API as well that we want to get the response but this time an integration using Access Token, we are able to get the access token via postman provided secret, client id and tenant id, etc. following from this document https://docs.microsoft.com/en-us/graph/auth-v2-user#:~:text=Azure%20AD%20will%20sign%20the,endpoint%...

 

But when we try to use the Access Token in Postman with the web app it only returns the login html. Same URL when we access to browser, after login using AD user it returns a json response.

Is there something I missed in the document?

2020-08-14_20-38-57.png2020-08-14_20-41-42.png

2 Replies

@orchidc Hi! Faced same issue. How did you fix this?

I am getting the same error. Have you solved it ?