User Principal Name /UPN is a property which is mandatory in SharePoint 2013 for Workflows and Provider Hosted Apps to work fine. When you employ a third party profile sync tool or a custom built one, the below SQL query will be quite handy to check whether the User Principal Name property is populated or not. 

SELECT    dbo.UserProfile_Full.UserID, dbo.UserProfile_Full.NTName, dbo.UserProfileValue.PropertyVal
FROM        dbo.UserProfile_Full WITH (NOLOCK) INNER JOIN
                    dbo.UserProfileValue WITH (NOLOCK)  ON dbo.UserProfile_Full.PartitionID = dbo.UserProfileValue.PartitionID AND           dbo.UserProfile_Full.RecordID = dbo.UserProfileValue.RecordID
WHERE     (dbo.UserProfileValue.PropertyID = 5090) AND (dbo.UserProfileValue.PropertyVal IS NULL OR
                    dbo.UserProfileValue.PropertyVal = '')