I would like to get a list of all users and their personal sites (mysites). (This is supposed to run on SharePoint Online from an app or a timer job.) I have tried all day but I can't get past the first step: i.e. to get all users in the tenancy. Anyone know how to?
I would try using Search REST API for this. The API can be used to query User Profiles and return the path to their My Site. You could even create a A-Z directory if you wanted. Very easy to do with search.
The following technet artcile should help - https://technet.microsoft.com/en-us/library/dn911464.aspx
We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.