Follow the below steps to eradicate this error.
Step 1 : Login to Viva Engage(Yammer) Admin Center : https://www.yammer.com/office365/admin
Step 2 : Navigate to Content and Security > Security Settings > External Messaging and check whether the option is set to “Allow community admins to add external users to their communities” – Please refer below screenshot.