Click on one of the links below to go to tools w/ ASP.NET source code demonstrating how to get an OAuth2 access token using three-legged OAuth2. This is also known as the "authorization code grant flow".
This is when your ASP.NET app acts on the behalf of a third-party user, your app must obtain the user's permission before it can make requests that access and update that third-party's confidential resources. A User access token carries a third-party's authorization to access specific resources, and this type of token is obtained through the authorization code grant flow.
Note: The code for all REST API's offering OAuth2 authorization is virtually the same. It should be easy to implement OAuth2 authorization for any REST API after studying a few of the above examples.