however, I am getting bad request error message saying “Invalid id_token” from Postman and from C# code too as shown below.
Please guide me through If there is any correction required to fix this issue
The most likely reason for this is you may have used a different authorization server to authorize and get tokens, for example,
https://{domain}.oktapreview.com/oauth2/default
Then in the logout call you are using,
https://{domain}.oktapreview.com/oauth2/v1/logout
instead of,
https://{domain}.oktapreview.com/oauth2/default/v1/logout
I see a different iss within that ID token than what you have in the request URL, namely that the token was issued by the “Default” Authorization server, but your /logout endpoint shows you trying to send it to the Org Authorization Server instead. Can you change the request domain/path so that it matches iss + /v1/logout, e.g.: