Accessing a secured API from a C# application

Hello,

My company is trying to use Auth0 to secure our software licensing API, and as part of this effort we would like to have our users authenticate with Auth0 from within our C# applications and then access a secured API endpoint. However, I have been unable to find any documentation on how to set the “audience” using the .NET Auth0.OidcClient. The API documentation tells me to refer to the Native application quickstart, but I couldn’t find any details there. Am I going about this the wrong way? Please help if you can.

Thanks! :slight_smile:

Hi @progdog,

You need to pass the audience as a parameter in the LoginAsync call…

client.LoginAsync(new { audience = “blah” });

Hope that helps :slight_smile:

1 Like

Thank you so much for the help!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.