Drawloop -Error "AADSTS50001: The application named ... was not found in the tenant named ..."
When using Office 365 storage on a subsite, the following error might occur:
AADSTS50001: The application named <application name? was not found in the tenant named <tenant ID>. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.
Documents can only be stored at the site collection level.