title: TokenCreationRequest does not contain a definition for Resources
body: <p>I had a question for creating token without username and password here <a href="https://stackoverflow.com/questions/63934055/how-can-i-get-token-from-token-endpoint-without-username-and-password-in-identit">how can I get token from token endpoint without username and password in identityserver4?</a></p>
  <p>But recently I decided to update my projects to use  .net5 ,but after that I found that my host don't support .net5 so I removed All .net5 and Installed the versions to 3.1.But below error is there I don't know how solve it</p>
  <pre><code>Error   CS1061  'TokenCreationRequest' does not contain a definition for 'Resources' and no accessible extension method 'Resources' accepting a first argument of type 'TokenCreationRequest' could be found (are you missing a using directive or an assembly reference?)
  
  Error   CS7036  There is no argument given that corresponds to the required formal parameter 'apiScopes' of 'Resources.Resources(IEnumerable&lt;IdentityResource&gt;, IEnumerable&lt;ApiResource&gt;, IEnumerable&lt;ApiScope&gt;)'
  </code></pre>
  <p>My code:</p>
  <pre><code>[HttpPost(&quot;Activate&quot;)]
          [AllowAnonymous]
          public async Task&lt;IActionResult&gt; Activate([FromBody] SignUpPhoneModel model, [FromServices] ITokenService TS, [FromServices] IUserClaimsPrincipalFactory&lt;JooyaIdentityUser&gt; principalFactory, [FromServices] IdentityServerOptions options)
          {           
              JooyaIdentityUser CurrentUser = await db.Users.Where(e =&gt; e.PhoneNumber == model.PhoneNumber).FirstOrDefaultAsync();
              
              if (!await UserManager.VerifyChangePhoneNumberTokenAsync(CurrentUser, model.ActivationCode, model.PhoneNumber))
              {
                  return BadRequest(&quot;Activation Code in not correct&quot;);
              }
              CurrentUser.PhoneNumberConfirmed = true;
              await db.SaveChangesAsync();
              await UserManager.UpdateSecurityStampAsync(CurrentUser);
              var Request = new TokenCreationRequest();
              var IdentityPricipal = await principalFactory.CreateAsync(CurrentUser);
              var IdentityUser = new IdentityServerUser(CurrentUser.Id.ToString());
              IdentityUser.AdditionalClaims = IdentityPricipal.Claims.ToArray();
              IdentityUser.DisplayName = CurrentUser.UserName;
              IdentityUser.AuthenticationTime = System.DateTime.UtcNow;
              IdentityUser.IdentityProvider = IdentityServerConstants.LocalIdentityProvider;
              Request.Subject = IdentityUser.CreatePrincipal();
              Request.IncludeAllIdentityClaims = true;
              Request.ValidatedRequest = new ValidatedRequest();
              Request.ValidatedRequest.Subject = Request.Subject;
  
              Request.ValidatedRequest.SetClient(SeedConfig.GetClients().Where(e =&gt; e.ClientId == model.ClientId).First());
              List&lt;ApiResource&gt; Apis = new List&lt;ApiResource&gt;();
              Apis.Add(SeedConfig.GetApis().Where(e =&gt; e.Name == &quot;IdentityServerApi&quot;).First());
              Apis.Add(SeedConfig.GetApis().Where(e =&gt; e.Name == model.ApiName).First());
              Request.Resources = new Resources(SeedConfig.GetIdentityResources(), Apis);// &lt;=== Error is here
              Request.ValidatedRequest.Options = options;
              Request.ValidatedRequest.ClientClaims = IdentityUser.AdditionalClaims;
              var Token = await TS.CreateAccessTokenAsync(Request);
              Token.Issuer = HttpContext.Request.Scheme + &quot;://&quot; + HttpContext.Request.Host.Value;
              Token.Lifetime = 32000000;
              var TokenValue = await TS.CreateSecurityTokenAsync(Token);
              TokenModel tm = new TokenModel()
              {
                  access_token = TokenValue
              };
              return Ok(tm);
          }
  </code></pre>