In the link you referenced https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-authenticate-an-ews-application-by-using-oauth the recommend way of adding the permissions is to modify the manifest if you haven't done this before see https://learn.microsoft.com/en-us/azure/active-directory/develop/reference-app-manifest and then . eg
{
"resourceAppId": "00000002-0000-0ff1-ce00-000000000000",
"resourceAccess": [
{
"id": "dc890d15-9560-4a4c-9b7f-a736ec74ec40",
"type": "Role"
}
]
}
Once you have modified the manifest you should then see the permission in the permission tab added to you application registration and you can then consent to.