Solved

ClaimPrincipal Read Group list into string

Posted on 2014-11-06
1
225 Views
Last Modified: 2014-11-07
I have this code:

 var claim = cp.FindFirst(ClaimGroup);

This will give me one group (works fine). The first one. But some people have more than 1 group. I need all the groups to be in 1 string/var

I tried something with foreach and FindAll .. but i can't figure it out. Can someone help?
0
Comment
Question by:A. Amien
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 40428036
Assuming you mean ClaimsPrincipal (not ClaimPrincipal as in your question title) then the FindFirst returns a Claim object.  
What do you expect when you pack more than one Claim into a string ?

ps.  something like the following should work
string s;
foreach(Claim c in cp.FindAll(ClaimGroup))
{
  s +=   //now do something with the returned Claim object to append it to the string
}
0

Featured Post

Is your NGFW recommended by NSS Labs?

Ours is! NSS Labs Next Generation Firewall Test gives the WatchGuard Firebox M4600 a "Recommended" rating! Curious where your NGFW landed on the  Security Value Map? See the map and download the full report today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing is at the top of most security top 10 efforts you should be pursuing in 2016 and beyond. If you don't have phishing incorporated into your Security Awareness Program yet, now is the time. Phishers, and the scams they use, are only going to …
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question