# Code sample project for implementing the Resource Owner Password Grant using .NET Core

**URL:** <https://community.auth0.com/t/code-sample-project-for-implementing-the-resource-owner-password-grant-using-net-core/21099>\
**Category:** Get Help\
**Tags:** dotnet-core, net-core, resource-owner-passw, aspnet-core, login\
**Created:** [February 8, 2019, 12:31pm UTC](https://community.auth0.com/t/code-sample-project-for-implementing-the-resource-owner-password-grant-using-net-core/21099 "2019-02-08T12:31:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PingPongSet](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pingpongset/32/10913_2.png) [@PingPongSet](https://community.auth0.com/u/PingPongSet)\
**Post date:** [February 8, 2019, 12:31pm UTC](https://community.auth0.com/t/code-sample-project-for-implementing-the-resource-owner-password-grant-using-net-core/21099/1 "2019-02-08T12:31:30Z")

</div>

Hi,

I am looking for code sample project for implementing the Resource Owner Password Grant using .NET Core, which can be downloaded and ran locally straight away.

The link below contains only C# code snippet,

[https://auth0.com/docs/api-auth/tutorials/password-grant](https://auth0.com/docs/api-auth/tutorials/password-grant)

Any idea?

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [February 16, 2019, 10:01pm UTC](https://community.auth0.com/t/code-sample-project-for-implementing-the-resource-owner-password-grant-using-net-core/21099/2 "2019-02-16T22:01:08Z")

</div>

We don’t have a sample for that, but basically it comes down to this:

```plaintext
var client = new AuthenticationApiClient(new Uri("https://YOUR_AUTH0_DOMAIN"));
var result = await client.GetTokenAsync( 
  new ResourceOwnerTokenRequest {
    ClientId = [...],
    ClientSecret = [...],
    Username = [...],
    Password = [...]
  }
);

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 3, 2019, 10:01pm UTC](https://community.auth0.com/t/code-sample-project-for-implementing-the-resource-owner-password-grant-using-net-core/21099/3 "2019-03-03T22:01:11Z")

</div>

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