It doesn't seem as easy as it sounds. I thought there was an Owner
property, but there isn't unfortunately.
I found this blog article that explains how you can extract the owner from the StoreID
you already have.
The most important thing is to convert the string
from a hexadecimal representation, and then use this regex:
private string ParseEntryID(string storeID)
{
string s = HexReader.GetString(storeID);
//TODO: These values might be different depending on
what you have named your groups in ESM
const string REG_EX = @"/o=First Organization/ou=First
Administrative Group/cn=Recipients/cn=(\w+)";
Match m = Regex.Match(s, REG_EX);
return m.Value;
}
The code for the HexReader
can be found in the article.