Issue
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.
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.
Resolution
Documents can only be stored at the site collection level. DocGen does not currently support Sub Site delivery.