Solved

ClaimPrincipal Read Group list into string

Posted on 2014-11-06
1
216 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
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

785 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