azureoauth-2.0azure-active-directorytokenazure-ad-b2c

how to Get token from URL?


My ADB2C created login page redirects to SPA after successful authentication and has an access token as URL parameter in the redirect URL. First, I want to extract an access token from a URL. Is this possible? And second, I want to store the extracted access token in localstorage. Is this also possible? Once these two are in place, I would expect the SPA to be able to access the backend API using an access token. thank you.


Solution

  • To get access token from URL make use of Postman.

    For more in detail, please refer these links:

    Obtaining an Access Token from Azure B2C using OAuth2.0 Authorization Code with PKCE in POSTMAN (vmsdurano.com).

    Request Access Token in Postman for Azure AD B2C - Stack Overflow.