0

I need to get givenname and user_id from /.auth/me into my web form application. I'm able to load and look at the values by adding /.auth/me to the end of the link to my page, but not sure how to get them into my C# code. I would like to set these to a C# variable so I can display them on my pages, and send them to the database.

I've been looking through the documentation for hours, but not really having any luck with success.

The main thing I'm trying to achieve is

var name = /.auth/me(givenname)

var id = /.auth/me(user_id)

Is there a simple way to accomplish this?

brandoonjen
  • 111
  • 9
  • You need to be authenticated already to be able to access `/.auth/me`. If you are not authenticated, you will be authenticated to login. Other than that, the response from `/.auth/me` returns JSON that you can deserialize. – DFord Jan 21 '21 at 21:22
  • See this https://stackoverflow.com/questions/42260708/azure-apps-easyauth-claims-with-net-core?answertab=votes#tab-top. – Allen Wu Jan 22 '21 at 06:21

0 Answers0