Get-AccessTokenWithPRT is currently failing when trying to get a Teams Access Token with a PRT. Get-AccessTokenWithPRT is currently hardcoded to use urn:ietf:wg:oauth:2.0:oob which is not a valid RedirectUrl for Teams.
Updated Get-AccessTokenWithPRT function to call the Get-AuthRedirectUrl, to get the correct RedirectUrl, and removed the hardcoded RedirectUrl paramater.
$response.html.body.script is not a valid property to parse the auth code from,
Updated Get-AccessTokenWithPRT to look in $response.html.body.h2.a.href, and parse the auth code from their.
Get-AccessTokenWithPRT is currently failing when trying to get a Teams Access Token with a PRT. Get-AccessTokenWithPRT is currently hardcoded to use urn:ietf:wg:oauth:2.0:oob which is not a valid RedirectUrl for Teams.
$response.html.body.script is not a valid property to parse the auth code from,