UiPath Office365 Activity, Error: "ADSTS50034 To sign into this application the account must be added to the {domainName} directory" Obtained

Whilst using the UiPath Office365 activity the following error message is displayed: ErrorCode invalid_grant MsalServiceException ADSTS50034 To sign into this application the account must be added to the {domainName} directory. How to resolve the error?

If the mentioned error message is displayed whilst using the UiPath Office365 activity, this means that it is an Authentication error and the message is returned by Azure. In this case, Azure is saying that could not found the user on the mentioned Azure Active Directory.

Perform the below steps:

  • Log-in in Azure Active Directory and check the tenant/directory id matches with the one provided in Studio.
  • Check that user is a member of such Azure Active Directory and does not have the "guest" status.