This is my current problem, and I have a feeling that I'm just missing some of the ArcGIS 'lingo' that would make this easily explainable.
So I need to grab all the maps available in my organization, and I know how to use http://www.arcgis.com/sharing/rest/content/users/' + username + '/' to grab all the content in the home directory of that user, and http://www.arcgis.com/sharing/rest/content/users/' + username + '/' + folder_id(User-Content) to get all the content in that user's folder at folder_id. I can then iterate over the resulting items and grab out all the web maps or what-have-you. The above needs to be done for each user in the organization. The trouble is, this organization is in a constant state of user-flux. So I cannot just store all the organization's users in an array and do this for every user in it; I need to be able to get a list of all the users in the organization. I have an administrator account, so I expect I will be able to see all the content in rest just like I could in ArcGIS Online.
The trouble is the REST API doesn't appear to have any means of searching for the users in an organization directly; they would have to all be members of the same group (which they aren't and I'd rather not force that), or I would have to specify the organization in a query to <community-url>/users?q=(User-Search), which doesn't appear to be possible, unless specifying access: org applies to users, which doesn't logically make sense to me.
So I guess my question is, is this possible? Can I search for the users in a given organization using REST? Would it be by finding the organization's web-portal's ID and use portal->users (portal->users)? Is a standard organization's 'My Organization' actually a portal? Where would I find that ID if it is? More swirling questions?