How to extract the users email address if you use AD as LDAP

LDAP used in my environment is Active Directory.

I want to send e-mail messages to multiple users. But I do not know how to retrieve the emailAddress for all the Active Directory user name.

Help, please.

Hello.

I got it working... and sharing code.

private String getIndividualUserEmail (String userId) {}

String emailAddress = "";

try {}

JpsContextFactory ctxf = JpsContextFactory.getContextFactory ();

JpsContext ctx = ctxf.getContext ();

IdentityStoreService = storeService

ctx.getServiceInstance (IdentityStoreService.class);

IdentityStore idStore = storeService.getIdmStore ();

SimpleFilter = SimpleSearchFilter

idStore.getSimpleSearchFilter (UserProfile.USER_NAME,

SimpleSearchFilter.TYPE_EQUAL,

userId);

SearchParameters params =

new SearchParameters (simpleFilter, SearchParameters.SEARCH_USERS_ONLY);

SearchResponse sr = idStore.searchProfiles (params);

System.out.println (SR.getResultCount ());

While (sr.hasNext ()) {}

Identity ID = sr.next ();

Profile UserProfile = id (UserProfile);

emailAddress = profile.getBusinessEmail ();

System.out.println ("Email:-" + profile.getBusinessEmail ());

}

} catch (JpsException e) {}

System.out.println ("getIndividualUserEmail: JpsException occurred");

} catch (IMException e) {}

System.out.println ("getIndividualUserEmail: IMException occurred");

}

return emailAddress;

}

Thank you

Tags: Fusion Middleware

Similar Questions

  • How to choose the display by default when you use two screens on my Mac Pro?

    How to choose the display by default when you use two screens on my Mac Pro?

    The default view when you have several is made that you drag the little icon in the menu bar in this pane:

    .

  • How to make the menu letters more when you use Lightroom 4?

    How to make the menu letters more when you use Lightroom 4?

    Hey Lenovo W510,.

    The police of interface only option in Lightroom of sizing is in the preferences > Interface > panels > Font Size (Small/Large)

    The configuration in grand and then restarting Lightroom will increase the fonts you see in the signs that describe the functions of LR.

    If you're on Mac or Windows you might also decrease your screen/display resolution that will make everything look bigger on your screen.

    Hope this helps,

    Kind regards

    Pete

  • How to change the default email address (to receive the distributed form) before distributing the form?

    Hello

    How can I change the e-mail address to which the .pdf form be reshipped to before distributing my form?

    Thank you

    Ian

    Edit > Preferences > identity > Email address

  • Entered by the user Email address becomes a hyperlink

    Is there a script that will change an email address entered by the user to a clickable hyperlink?

    Thank you

    Hello

    Something along these lines should work (click on the textfield event):

    if (this.rawValue !== null) {
         var vEmail = this.rawValue;
         var vSubject = "A Subject for your email";
         var vBody =  "Put your body message here...";
    
         event.target.app.mailMsg({
              bUI: true,
              cTo: vEmail,
              cSubject: vSubject,
              cMsg: vBody
         });
    }
    

    Which should help you in the right direction

    Niall

  • How to display the user name for database connection using dreamweaver? [was: help]

    connect display mode database using dreamweaver user name

    LionelLionel wrote:

    OK, sorry 4 that; I use dreamweavercs6 and the script server is php.i as accurate must I set up a server (wampserver) local on my laptop for this level of competence of project.my with scripts php is very limited. and now, after you have created the database (in phpmyadmin), I want to display the user name of the user after login... I need help please.thx

    You want to display it where? On the login page of "success"?

    Add the below to each top of the page:

    Then add the following in the code where you want the ' user name to appear:

  • How to extract the value of a tag XML using regular Expressions

    We get a response XML from a WEB SERVICE.

    I convert it to VARCHAR2.

    Now, I want to get the real answer that is inside the tag of the response.

    I tried this:

    DECLARE

    V_1 VARCHAR2 (30000): = ' < soap: Body > < ns:ProcessArgusFeedsResponse xmlns:ns = "urn: PegaRULES:SOAP:ArgusToPegaFeeds:Services" > ' |

    '< response > good < / answer >< / ns:ProcessArgusFeedsResponse > < / soap: Body > ';

    v_response VARCHAR2 (100);

    BEGIN

    DBMS_OUTPUT. PUT_LINE (V_1);

    v_response: = REGEXP_SUBSTR (v_1, ' / < >(.+?) < \/Response > answer /');

    dbms_output.put_line (v_response);

    END;

    It does not work.

    Any help would be greatly appreicated.

    Hello

    user12240205 wrote:

    We get a response XML from a WEB SERVICE.

    I convert it to VARCHAR2.

    Why?  XML has its own native ways of analysis; Why not use them?

    If you use regular expressions, then REGEXP_REPLACE, as shown above, is a good option in Oracle 10, but starting in Oracle 11.1, you can use REGEXP_SUBSTR like this:

    REGEXP_SUBSTR (v_1

    , '(.+?)'

    1

    1

    NULL

    1

    )

    The 6th argument is like a backreference; "He tells REGEXP_SUBSTR did not return to the entire organization, but only the part inside the 1st left '(' et correspondant à sa droite).

    The '?' to make it non-greedy is necessary only if v_1 can contain more than one response.

    Now, I want to get the real answer that is inside the tag of the response.

    I tried this:

    DECLARE

    V_1 VARCHAR2 (30000): = "" |

    'Good';

    v_response VARCHAR2 (100);

    BEGIN

    DBMS_OUTPUT. PUT_LINE (V_1);

    v_response: = REGEXP_SUBSTR (v_1, ' /(. +?)) <\ esponse="">/');

    dbms_output.put_line (v_response);

    END;

    It does not work.

    That's because it's looking for a slash ("/") before the '' tag and another after the ' tag.

    The backslash ("\") is not necessary here, but it is not nothing wrong.

  • How to reference the names of columns, if you use select *.

    Hello

    How to reference the names of columns to get out of the data, when you use select * and not aware of the column names (and number of columns) in advance.

    Even if I could get the column names in the other variables. I am new to CF so question may be stupid.

    getting column names: -.

    < cfquery datasource = "RTW_ORA" name = "cn" >
    SELECT COLUMN_NAME
    OF ALL_COL_COMMENTS
    WHERE TABLE_NAME = ' #meas #
    < / cfquery >

    obtain data: -.

    < cfquery datasource = "RTW_ORA" name = "cd" >
    SELECT *.
    To #meas #.
    < / cfquery >

    How do all the output data?

    Any help would be much appreciated!

    Thank you

    Tushar Saxena

    How to reference the names of columns to get out of the data, when you use select * and not aware of the column names (and number of columns) in advance.

    Even if I could get the column names in the other variables. I am new to CF so question may be stupid. getting column names: -.


    SELECT COLUMN_NAME
    OF ALL_COL_COMMENTS
    WHERE TABLE_NAME = ' #meas #

    obtain data: -.


    SELECT *.
    To #meas #.

    How do all the output data?

    Your question is not stupid. You can use the concept of a query requestand their properties cfquery attributes name and result.


    SELECT *.
    To #meas #.






    column names: #column_names #.

    number of columns: #no_of_columns #.



    SELECT #column_names #.
    FROM the cd



    A SQL query: #resQoQ.sql #.

    Query:


       
       
    #column #: #cd [column] [currentrow] #.
       


    T/t:


       
    #column #: #QoQ [column] [currentrow] #.
       


  • How to escape the quotes and commas when you use the command of the coil

    I am creating a file .cvs with data in my database. I call the function of coil and below select stmt

    ' Select ' ' ' | ID | '","' || name | '","' || Description | '","'

    I want everything to be separated by quotes and commas. Description data can have quotes and commas so how I get away from them in my queue code so that when I use SQL Loader data will get entries in the database correctly.

    Thank you!

    Hello

    If the field is closed, so there is nothing else you need to do for the column separator (en).

    To use the character encompassing ("") in the field, double it, the same way you use two single quotation marks to signify a single_quote into a SQL string literal:
    {code}
    ' SELECT ' ' ' | ID
    ||     '","'     || name
    ||     '","'     || REPLACE (description
    , '"'
    , '""'
    )
    ||     '"'
    FROM table_x;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    
  • How to disable the additional noise filter when you use a Lifeproof subwoofer

    I have a 6 s Iphone now with a case of Lifeproof! I was told there is an option of noise or a filter to turn off so that people

    agree on cell?

    Thank you

    Gary

    You have the Lifeproof who says that it is for the 6/6s on the box? Or do you have one that says just the iPhone 6? If you have one that was planned for the iPhone 6, it won't work properly as it covers some things, that he should not.

    You can try to disable the noise suppression. Settings > general > accessibility > telephone noise cancelling.

  • How can I change the login email address and access to the features of Windows 8?

    Original title: I accidentally entered a wrong email across to the top of the upgrade to windows 8 and now I can't access all the features of windows 8.

    When you install the upgrade for windows 8 he asked for my email address.  I misspelled my domain name, which causes it have instructions or messages will in the vast desert of never never land.  I need to check my email to make the apps work, but given that the email is valid I can't do that.  I need to know how to change the login email address in windows 8 so that I can go ahead and verify my account.

    Hi I also had this problem but I have used the local account and was able to access all applications with my correct email. I hope this helps!

  • Somehow, I blocked my user account (login) and I tried to help but can't find any info. How to UNLOCK the user account. Than k you

    The user has clicked on Vista, the little lock at the bottom of the START window.

    Somehow, I blocked my user account (login) and I tried to help but can't find any info. How to UNLOCK the user account. Thank you

    Hello

    Click the account icon that was locked and enter the password IF you know and otherwise:

    Try Safe Mode - several times, press F8 that you start. The Admin account there is no default password
    so unless someone has changed, you should have access there. Then Control Panel - accounts - users
    Manage another account - use this down your user account (to the lowest level) APPLY/OK
    then go back and reset it to the Admin APPLY/OK - this clearly allows corruption. Do this several times.
    Then fix the password in your usual account. Do not forget to leave your account administrator if you
    wish.

    If no joy Mode without failure:

    Try this - use the hidden administrator account to lower your user account (to the lowest level) APPLY/OK
    then go back and reset it to the Admin APPLY/OK - this clearly allows corruption. Do this several times.
    Then fix the password in your usual account. Do not forget to leave your account administrator if you
    wish.

    Make another Admin account with your password and use it to fix the others if necessary. (just for
    repair, don't use regular account, not a safety valve) always keep a spare ADMIN account.

    DO NOT LEAVE THE ENABLED LSA OR USE DAILY. If it corrupts you are toast!

    How to enable or disable the real built-in Administrator account in Vista
    http://www.Vistax64.com/tutorials/67567-administrator-account.html

    You can run the Admin account hidden from the prompt by if necessary.

    This tells you how to access the System Recovery Options and/or a Vista DVD
    http://windowshelp.Microsoft.com/Windows/en-us/help/326b756b-1601-435e-99D0-1585439470351033.mspx

    If you cannot access your old account, you can still use an Admin to migrate to another (do not forget to always
    not that an Admin account that is not used except for testing and difficulty).

    Difficulty of a corrupted user profile
    http://windowshelp.Microsoft.com/Windows/en-AU/help/769495bf-035C-4764-A538-c9b05c22001e1033.mspx

    ---------------------------------------------------------

    If necessary:

    Ophcrack is a free Windows password cracker based on rainbow tables.
    http://Ophcrack.sourceforge.NET/

    How to reset a Windows Vista - Trinity Rescue Kit method - password password reset disc - burn the ISO
    http://www.WikiHow.com/reset-a-Windows-Vista-password
    YouTube video on the use of the Trinity rescue Kit
    http://www.YouTube.com/results?search_query=Trinity+rescue+Kit&search_type=&AQ=f

    Reset your forgotten password the easy way using the Ultimate Boot CD for Windows
    http://www.howtogeek.com/HOWTO/Windows-Vista/reset-your-forgotten-password-the-easy-way-using-the-ultimate-boot-CD-for-Windows/

    Offline NT Password & Reset Editor
    http://home.eunet.no/~pnordahl/ntpasswd/

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • How can I display an email address without opening the email?

    How can I display an email address without opening the email?  I want to know who sent me spam so I can block it without opening the email.

    There is no danger at the opening of the long spam email that you do not click on any links in the email.

  • How can I add an email address to the primary e-mail address

    I free e-mail by MSN.  How can I add my husband's e-mail address?  My email is the first email address.

    Contact MSN Support:
    http://support.Microsoft.com/kb/940784

  • I changed my internet provider and so I have the new email address. How can I delete my old e-mail address and put them in a new in Outlook express?

    I changed my internet provider and so I have the new email address.  How can I delete my old e-mail address and put them in a new in Outlook express? AND another problem, if I want to send pictures by e-mail... default .it my no more used by email, not allowing to send because I do not agree with them. Thank you

    original title: outlook express

    XP was the last version of Windows to use Outlook Express and that you are in a forum of Vista. Assuming that Windows Mail:
     
    Tools | Accounts and add the new address/provider and remove the old.
     
    Once the old account is removed, your second issue must be without object.

Maybe you are looking for