fixed issue with generating custonLink and tenantId