title: How to add custom claim on Jwt Token based on user input?
body: <p>I'm having trouble in adding custom claim (tenant id) to my token. So my program allows users to switch their workspace using tenant id. In order to do that I need to receive the selected Tenant Id and generate new token with the selected tenant id inside the token.</p>
  <p>To generate the token first time during login, I used this code</p>
  <pre><code>var tokenResponse = await httpclient.RequestPasswordTokenAsync(new PasswordTokenRequest
                  {
                      Address = discoveryDocument.TokenEndpoint,
                      UserName = model.PhoneNumber,
                      Password = model.Password,
                      ClientId = Configuration[&quot;ClientInformation:ClientId&quot;],
                      ClientSecret = Configuration[&quot;ClientInformation:ClientSecret&quot;]
                  });
  </code></pre>
  <p>And to generate new token after they login to switch the tenant, I used refresh token.</p>
  <pre><code> var tokenResponse = await httpclient.RequestRefreshTokenAsync(new RefreshTokenRequest
          {
              Address = discoveryDocument.TokenEndpoint,
              ClientId = Configuration[&quot;ClientInformation:ClientId&quot;],
              ClientSecret = Configuration[&quot;ClientInformation:ClientSecret&quot;],
              RefreshToken = model.RefreshToken
          });
  </code></pre>
  <p>I already seen how profile service receive data using claimsprincipal and thats where I was confused how to insert new value inside the claimsprincipal</p>
  <p>So my question is how do I send the selected tenant id to profile service?</p>