I have put together some code which will allow a Tenant Administrator to modify the User Profile Properties of another user in the tenant. This could be useful if a batch job has to be performed and profile properties have to be set (or updated) for all the users in a Tenant. The code is only to set the properties of one user but you can easily modify it to do the same for multiple users.
This code can also be found as a part of the Office 365 Patterns and Practices code samples on GitHub:
You will need the AccountName of the user whose profile properties you want to modify. To get the AccountName of all the user's in a Tenant, you can use People search.
Some points to note with this approach:
1) You need to know the credentials of the Tenant Admin
2) I have tried using this code in a Provider Hosted App with App Only Policy but it does not seem to work. It only works in a Console Application for now.
3) This is only available in SharePoint Online for now and not SharePoint 2013 On-Premises.
4) You will need the 126.96.36.199 version of the following libraries: