none
Status of a request made by the user RRS feed

  • Question

  • Hello all,

    I am creating a page where i am displaying whether the user is subscribed for a group or not and then providing appropriate options to subscribe or unsubscribe a group on Forefront Identity Manager . The point where I am stuck is how to know whether the already made request is in pending status or not. I want to show 'pending' tag for the above mentioned scenario. Is there any C# method or code to achieve this. If not please provide an approach on how to implement it.

    Wednesday, April 20, 2016 2:49 PM

All replies

  • If the user you are looking for is the same one submitting the request, then you can use this xpath query:

    /Request[Creator = /Person[AccountName='the user accountname'] and Target = /Group[DisplayName = 'Your group displayname']]

    I'm assuming you are using the FIMClient based on your other questions. So, to get the status you need to enumerate like so:

    //DC is an instance of the DefaultClient

    foreach (RmRequest request in DC.Enumerate("The xpath query above")) {

    //Your code here }


    Wednesday, April 20, 2016 4:13 PM
  • Thanks for your reply. Xpath query will be a great  help.

    Problem for me is that I am not getting any response from FIM portal.

    Code:

    using System.Net;

    using Microsoft.ResourceManagement.Client;

    using System;

    using Microsoft.ResourceManagement.ObjectModel;

    using Microsoft.ResourceManagement.ObjectModel.ResourceTypes;

     

    class FIMtest {

                                     

       public void testMethod() {

    //client instance

            DefaultClient client = new DefaultClient() 

    foreach (RmResource resource in client.Enumerate(string.Format("//XPATH Query"))) {

    //code

                 }

    }

    public static void main(String args[])

    {     FIMtest obj=new FIMtest();  

    Obj.testMethod();

    }

     

    }

     

    Code breaks at 'foreach' statement while debugging. One reason being a "NULL" value response while enumerating.

    I am using a simple console application project.

    Please let me know if any specific configurations I need to make in 'app.config 'file to resolve this, or any settings I need to   update.

    Thanks in response.


    Wednesday, April 20, 2016 5:29 PM
  • We use both the old FIM Client and the new LithNet Client.

    The new LithNet client is easier to configure, and requires basically no configuration at att if you're connecting to localhost.

    Get it here:

    https://lithnetrmc.codeplex.com/wikipage?title=Getting%20started&referringTitle=Documentation


    Did my post help? Please use "Vote As Helpful", "Mark as answer" or "Propose as answer". Thank you!

    Thursday, April 21, 2016 6:40 AM