Hello @Stanley Arua , the appId
claim is only available in V1.0 tokens which seems to be the version expected by the validate-azure-ad-token library. For V2.0 tokens you might try another library such as jsonwebtoken.
Let us know if you need additional assistance. If the answer was helpful, please accept it and rate it so that others facing a similar issue can easily find a solution.