locked
Not able to read ApplicationUserCredential from UserMap RRS feed

  • Question

  •  I am trying to retrieve UserMap from the GetMappingsFor ApplicationResponse that is returned from the Identity Manager.I am able to get all values except ApplicationUserCredential and ApplicationCredentialType from the response.

     

     

     

     

    [CsfMessaging.Operation(Name = "GetMappingsForApp_req", Action = IdentityActions.GETMAPPINGSFORAPPLICATIONREQUEST, ResponseType = typeof(UserMap[]))]

     

    public UserMap[] GetMappingsForApp_req()

    {

    CsfSdk.Message message = CsfSdk.Message.CreateMessage(IdentityManagerActions.GetMappingsForApplicationRequest, new Uri(IDENTITYMANAGER));

     

    Microsoft.ConnectedServices.Contracts.IdentityManager.GetMappingsForApplicationRequest request = new Microsoft.ConnectedServices.Contracts.IdentityManager.GetMappingsForApplicationRequest();

    request.ApplicationId = "helloworld";

    message.SetBodyObject(request);

    CsfClient.MessageSender sender = new CsfClient.MessageSender();

    UsernameOverTransportAssertion assertion = new UsernameOverTransportAssertion();

    assertion.UsernameTokenProvider = new UsernameTokenProvider("IdentityUser", "password123$");

    Policy policy = new Policy(assertion);

    sender.SetPolicy(policy);

     

     

     

     

    try

    {

     

    Microsoft.ConnectedServices.Contracts.IdentityManager.GetMappingsForApplicationResponse response = sender.SendSync<Microsoft.ConnectedServices.Contracts.IdentityManager.GetMappingsForApplicationResponse>(message);

    UserMap[] usermap = new UserMap[1];

    usermap[0] = new UserMap();

     

    usermap[0].UserId = response.UserMaps[0].UserId;

    usermap[0].ApplicationId = response.UserMaps[0].ApplicationId;

    usermap[0].ApplicationCredentialType = response.UserMaps[0].ApplicationCredentialType;

    usermap[0].ApplicationUserId = response.UserMaps[0].ApplicationUserId;

    usermap[0].ApplicationUserCredential = response.UserMaps[0].ApplicationUserCredential;

     

    return (usermap);

    }

     

    catch (Exception e)

    {

    throw new Exception("Error reading usermap" + e.Message);

    }

     

    }

     

    Here my CSFSERVICE i.e alpplication registered for secondary credential is "helloworld" and I have only created one usermap for UserId John@CONTOSO.COM

     

    Monday, July 2, 2007 4:40 AM

Answers