Azure-docs: "Retrieve tokens in app code" - tokens not found in request headers

Created on 11 Dec 2018  Â·  7Comments  Â·  Source: MicrosoftDocs/azure-docs

I have successfully enabled Google authentication for my nodejs test app, but I don't see the provider-specific tokens listed above in the request headers received by my server code. None of the X-MS-TOKEN-GOOGLE properties appear in the request header.

I do see "x-ms-client-principal-name", which is set correctly based on my Google login, so the authentication is working. I also see that "x-ms-client-principal-idp" is "google" and "x-ms-client-principal" is a long base64 string - is this the google ID token?

Please clarify how I can retrieve profile information for the authenticated Google user. Thanks!


Document details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

app-servicsvc assigned-to-author product-question triaged

Most helpful comment

@bbi-yggy Yes, the x-ms-client-principal deals with the user profile that is authenticated.

We have assigned the issue to the doc author to see if they would consider adding steps around using this value and to verify if the X-MS-Token-GOOGLE tokens are still valid.

All 7 comments

@bbi-yggy Thanks for your feedback! We will investigate and update as appropriate.

@bbi-yggy Yes, the x-ms-client-principal deals with the user profile that is authenticated.

We have assigned the issue to the doc author to see if they would consider adding steps around using this value and to verify if the X-MS-Token-GOOGLE tokens are still valid.

@mattchenderson Can you help with this?

@bbi-yggy is the token store enabled for your app? The token store setting can be found in the Authentication / Authorization blade of the portal. If so, do you see any of the expected tokens if you navigate to the built-in /.auth/me endpoint of your web app?

Hi @cgillum, thanks for responding this this thread. To be clear, I have everything working with my app - I logged this issue because the documentation does not seem to be consistent with how it actually works. I am also now 5 weeks more experienced with Azure and Google auth, so possibly I was more easily confused back in December. :-)

@bbi-yggy I think what @cgillum is saying is that X-MS-TOKEN-GOOGLE is expected unless there's some condition in your app's auth configuration that makes it not show up and trying to get to the bottom of why it's not showing up for you.

I'm not sure. I have what I need for now, so I will close this ticket. Many thanks for your attention.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ponant picture Ponant  Â·  3Comments

DeepPuddles picture DeepPuddles  Â·  3Comments

ianpowell2017 picture ianpowell2017  Â·  3Comments

bityob picture bityob  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments