Is there a way to call the Exchange Web Services using an unlicensed Exchange Administrator account [email@example.com] to list all public folders?
Scenario: Listing Public Folders
1. Using the Exchange Admin Center with the unlicensed Exchange Administrator account, I can list the public folders.
2. Using the EWS.GetFolder with the same credentials, ErrorNonExistentMailbox was returned and no folders were listed.
Make sure the Administrator account running the EWS script has ApplicationImpersonation permissions.
Have you checked the below threads :