Re-grant user permissions for LinkedIn not working
<p>There's a major issue in LinkedIn OAuth2 flow for external application <strong>Grant Access</strong>.</p>

<p>If user remove the external application grant access from their app settings and grant the access again after authentication then <strong>MyApp</strong> settings will not show the external application anymore. </p>

<p><strong>Reproduce the issue:</strong></p>

<ul>
<li><em>Step1:</em> Remove the granted access for any external application from MyApps under settings page - <a href="https://www.linkedin.com/secure/settings" rel="nofollow">https://www.linkedin.com/secure/settings</a></li>
<li><em>Step2:</em> Authenticate again for the same deleted external application using the LinkedIn account credentials and grant the access for requested permissions.</li>
<li><em>Step3:</em> Refresh the page mentioned in Step1. You'll not see the external application with grant permissions.</li>
</ul>

<p><strong>Note:</strong></p>

<p>You'll get the access token in second authentication attempt without any issues but all other API callbacks will be failed using the new access token with below error:</p>

<pre><code>401
{
  "errorCode": 0,
  "message": "Then token used in this request has been revoked by the user.",
  "requestId": "HWZ5X8TVSH",
  "status": 401,
  "timestamp": 1466526549077
}
</code></pre>

<p>Tested with other social networks such as Facebook and it's working perfectly fine.</p>