If the permission is delegated, then the user will only be able to access mailboxes they already have access to ( their own, shared etc..)
If the permission is application, then they can access ALL the mailboxes in the tenant unless you scope the permissions to the app: Note that permissions this supports in the doc as well:
https://learn.microsoft.com/en-us/exchange/permissions-exo/application-rbac