Hello,
I’m using the new Auth0.oidcClient with my .NET app. I’m successfully authenticating against my API and everything is working as far as the authentication, however I’m not receiving any of my custom claims from my app_metadata. For example, I have in my app_metadata a property called “app_metaDataproperty” and it’s not returned as a claim.
private Auth0Client auth0 = new Auth0Client(ConfigurationManager.AppSettings"auth0:Domain"],
ConfigurationManager.AppSettings"auth0:ClientId"],
null,
"openid profile app_metaDataproperty",
true);
//Attempt to login
var LoginResult = await auth0.LoginAsync(ExtraParms);
//Next, attempt to get the to the protected resource on the web API
if (LoginResult.IsError == false)
{
var client = new RestClient("http://localhost:5896/api/ping/claims");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", string.Format("Bearer {0}", LoginResult.AccessToken));
IRestResponse response = client.Execute(request);
System.Windows.Forms.MessageBox.Show(response.StatusCode.ToString());
}
If I make a call out to the /userinfo endpoint, it too doesn’t return my app_metadata.
Is there any way to get the app_metadata into my claims if I’m using the OIDC client?
Thanks.