How to get Sub Claim from Access Token

Hi. I gave the scenario for reference, but my initial question still stands. How do I extract the Sub from the Access Token? Is this possible?