title: Calling web api from SPA giving error: Azure AD b2c
body: <p>Here is my aim: I would like to get an access token to call web api from my Spa application.</p>
  <p>I created 2 azure b2c applications; one for web api and other for spa application(client).</p>
  <p>I added scopes(api.read) by exposing api in web api application. I granted permission to these scopes from spa application.</p>
  <p>I created one userflow with Sign up and sign in policy.</p>
  <p>To generate the token, I used PKCE flow by getting auth code.</p>
  <blockquote>
  <p>POST
  <a href="https://tenant.b2clogin.com/tenant.onmicrosoft.com/policy/oauth2/v2.0/token" rel="nofollow noreferrer">https://tenant.b2clogin.com/tenant.onmicrosoft.com/policy/oauth2/v2.0/token</a></p>
  <p>grant_type: authorization_code</p>
  <p>client_id: api_appid</p>
  <p>scope: <a href="https://tenant.onmicrosoft.com/web_api/api.read" rel="nofollow noreferrer">https://tenant.onmicrosoft.com/web_api/api.read</a></p>
  <p>redirect_uri: https://localhost:435</p>
  <p>code:</p>
  <p>code_verifier:</p>
  </blockquote>
  <p>The thing is I get the token but while calling the web api, it's giving error like:</p>
  <pre><code>Either scp or roles claim need to be present in the token
  </code></pre>
  <p>What could be the problem?</p>