Sharepoint - SharePoint access for non-licensed users
First you turn on external sharing for your Office 365 tenant, and than you enable external sharing on the site collection you want to share with external (non-licensed) users.
Manage external sharing for your SharePoint Online environment
If the Users are inside your organization and need access only to SharePoint Sites they do not require any Office365 Licenses at least for now. You just need their Office365 ID created either by Sync or Manually, whatever method you follow for regular users. The Only difference is you create account without assigning any License to it.
Now just go ahead and add users to the SharePoint Groups (Visitor, Members or Owner) according to whatever is your requirement.
Currently Office365 Licenses is only needed for OneDrive and MySites/Delve Profile. So Unlicensed Users will not have those, but can access any SharePoint Sites based on whatever permission they have.
Currently, we find this behavior useful because we want users to have access to SPO, but not to One Drive (which is added if we assign a SPO license).
From SharePoint UserVoice Forum by SDADM commented on August 24, 2016 7:08 PM