Similar Posts

8 Comments

  1. After my quick investigation, it looks like that the Index is the Record ID of the user profile in the database. I’m not sure if this Record ID is actually surfaced anywhere at all in the documentation, but if you can surface it in your code through the API, you can use this to guarantee a reference to an existing User Profile.

    1. Thus the confusion. And it doesn’t seem to be an ID which is available anywhere *other* than in the User Profile Store. So the only way you can know what it is is to know what it is. See? Confusing.

      M.

      1. I guess it provides an way (when combined with GetUserProfileCount) to walk all the user profiles if you needed to access each and every one for whatever reason.

        1. If you read the posts I linked to, you’ll see that “walking” the profiles based on the count won’t work reliably, either, because the count doesn’t tell you how many are missing (deleted). All in all, confusing. Thus the post!

          One would think, given that the name of the operation is GetUserPofileByIndex, that one could pass in some *known* index to get a particular User Profile. Alas, that doesn’t seem to be the case, since you can’t know the right index unless you already have the User Profile. It seems that you would need to loop through all of the existing profiles until you got a match on name or some other property which ensured you had a match. That’s horrible inefficient, if nothing else.

          M.

          1. According to ILSpy, the method isn’t actually used by anything in that class, either. Maybe it was put in there for intended future use? The confusion continues.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.