Oh AOS why have you forbidden me

Sometimes when services are trying to authenticate to an AOS in Dynamics 365 for Finance and Operations, both in the Cloud version and the on-premises version, the calling application may receive the error message “forbidden” back from the AOS. This message is deliberately vague, because we don’t want a calling application to be able to…