Tthe DirectoryId and TenantId both may be used by Microsoft documentation and products, which can be confusing.
Basically, Azure Tenant ID is just a GUID that you can get in the Azure AD tenant.
Open the Azure Portal, navigate to Azure Active Directory and Properties:
Thanks for reading! You can follow me on Twitter @PrigentNico