This occurs if the user mailboxes are created in the Exchange admin center and the users aren't yet assigned a license.
Create a view in the Office 365 portal to display a list of users who have mailboxes but don't have a license. To do this, follow these steps:
1- Sign in to the Office 365 portal (https://portal.office.com) as an admin.
2- Click users and groups, and then click active users.
3- Click Filter ( ), and then in the drop-down box, click Unlicensed users.
4- NoteTo assigns a license to a user, double-click the user. On the "Assign licenses" page, click the checkboxes next to the items you want to assign, and then click Save.
Please mark as "Accept the answer" if the above steps helps you. Your suggestion will help others also !