This page links to MS Article "Configure a client application to access a web API"
This article may prove helpful when setting up a client to use email