Say I have clientId, tenantId, tokenType, redirectUri etc in azure. Can I use those parameters to get access token directly?
I know there is a way which is to combine them together to create a long string.
const url = 'https://login.microsoft.com/'+ tenantId+'/oauth2/v2.0/authorize?client_id='+clientId+'response_type=id_token&redirect_uri=window.location.origin&response_mode=fragment&scope=openid&state=11111&nonce=11111';
Then I open a new window
window.open(url, '_self');
Once the new window pops up, the url is pretty long. It contains the token and idtoken all the information.
But I don't want to use this way because expose the token in uri is a bad thing. I want to use clientId etc to get the url fragment in the code directly. I guess that msal internal hacks it but just not sure.
UPDATE:
I meant that I put the long string in POSTMAN post request even set response_mode=form_post
then click send button but I just got a bunch of HTML. Is that the correct way to do that?