When using the UiPath Office365 activity the error message is displayed: "AADSTS90010 The grant type is not supported over the /common or /consumers endpoints"

When using the UiPath Office365 activity the following error message is displayed: "AADSTS90010 The grant type is not supported over the /common or /consumers endpoints".

The mentioned error message appears when in the Office365 Activity scope the TenantID field has been populated with an empty string or the Tenant ID/Name introduced is a wrong one.

As explained in the message from Azure AD, the authority used in the application needs to be tenanted or otherwise “organizations”