I have a use case where I need to get all the proxy addresses from a couple of Active Directory sources, combine them into a single list and then flatten it into one long csv string.
Doing a bit of reading on here I think I can use the IDNRuleUtil method;
public String getFirstAccountNativeIdentity(String applicationName, String identityName)
is what you can use.
BTW, putting all proxy addresses in one string in comma separated format would go beyond standard limit of identity attribute(which is somewhere around 256 chars, you can confirm this number with sp support) so you should strip non relevant addresses like those X509 e.g. We had to use multiple identity attributes even after stripping in past to store all addresses and then check uniqueness against those.