JWTTokenDecod
1 Topicextract appid from decoded jwttoken
I have below ymal . where I am using PowerShell script to extract app from Jw token after decoding it . I am not able to get exact app id ( guid ) from the decoded object. it is coming as *** Could someone suggest me how to extract appid from jwt token. parameters: - name: jwttoken default: '' steps: - powershell: | $encodedToken = '${{ parameters.jwttoken }}' Write-Host $encodedToken $tokenParts = $encodedToken -split '\.' $tokenPayload = $tokenParts[1] #Fix padding as needed, keep adding "=" until string length modulus 4 reaches 0 while ($tokenPayload.Length % 4) { Write-Verbose "Invalid length for a Base-64 char array or string, adding ="; $tokenPayload += "=" } $decodedPayload = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($tokenPayload)) $tokenObject = $decodedPayload | ConvertFrom-Json $appId = $tokenObject.appid Write-Host $appId1.2KViews0likes3Comments