How to get users picture field displayed via _api/Web/Lists - SharePoint Online

I have created a field of type Person or Group with "show field  picture only".
When I look at the result I get back from the _api/web URL what I see is this as the field name:
    <d:OData__x0061_wo9Id m:type="Edm.Int32">25</d:OData__x0061_wo9Id>  
I need to get the right properties like username,accontname etc..out and I think need to build this url below: 
    /_layouts/15/userphoto.aspx?size=M&accountname=name%40domain.com.au&url=https%3A%2F%2Fdomain-my.sharepoint.com%3A443%2FUser%2520Photos%2FProfile%2520Pictures%2Fusername_domain_com_au_MThumb.jpg
to be able to get each users picture.
Thanks in advance

Hi,
To get the UserName or AccountName of a Person or Group column, you can take the URL below for a try:
siteUrl + "/_api/web/lists/getbytitle('" + listName + "')/items(" + itemId + ")?$select=Title,OData__x0050_G1/Name,OData__x0050_G1/UserName,OData__x0050_G1/Title&$expand=OData__x0050_G1/Name,OData__x0050_G1/UserName,OData__x0050_G1/Title"
If you want to get the Picture URL of an user, you can send another request to User Information list:
siteUrl + "/_api/web/siteUserInfoList/Items"
Best regards,
Patrick
Patrick Liang
TechNet Community Support

Similar Messages

  • How to get user language in property renderer without web dynpro (java)

    Hi all,
    how can I get the language of the current user?
    Normally I got it with:
    IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
    com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
    IUser ep5User = WPUMFactory.getUserFactory().getEP5User(sapUser);
    IResourceContext resourceContext = new ResourceContext(ep5User);
    String strUserLanguage = resourceContext.getLocale().getLanguage();
    But this only works in web dynpro applications. Now I need to get the language in my own property renderer. The code throws:
    com.sap.tc.webdynpro.services.sal.um.api.WDUMException: No client user defined for the current request (no regular Web Dynpro request as ITask is null.
    Thanks a lot
    Steffi

    Hi,
    If you are in a property renderer you always have a IResource which inturn has a ResourceContext and ResourceContext has the Users object.
    So the code should be:
    IResourceContext resourceContext = IResource.getContext();
    IUser user = resourceContext.getUser();
    user.getLocale().getLanguage();
    Regards,
    Praveen Gudapati
    Edited by: Praveen Gudapati on May 16, 2008 2:54 PM

  • How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?

    How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?
    any idea?

    Hi,
    From your description, my understanding is that you want to get user profile properties in provider-hosted app in SharePoint online using REST API.
    Here is sample code for getting user profile properties:
    http://www.vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html
    Here is a blog below about accessing data from the provider-host apps:
    http://dannyjessee.com/blog/index.php/2014/07/accessing-sharepoint-data-from-provider-hosted-apps-use-the-right-context/
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to get user logged in to ironport web

    How to get user logged in to ironport web by  their username, time connected and the IP address?

    The onbox reporting can only show what web traffic is currently being surfed.  We can provide a near-real time view of this web traffic with a "Web Tracking Report".
    However, there is not a report available that depicts what you're describing.  (This information is best contained on the domain server).  The closes we could get with the WSA is displaying which credentials we are currently caching.  (Which users we've seen since within the surrogate timeout).  This is possible with the authcache command on the cli.
    ~Tim

  • How to get u00BBshort descriptionu00AB  field in structure u00BBBAPIDFKKCLu00AB in local la

    Hello
    I wander how to get »short description«  field in structure »BAPIDFKKCL« in local language »SK«(Slovakia).
    In SMLT transaction I tried several combination of supplementing Language »SK« (with »EN«) none with success. 
    What do you propose? Which combination of parameters in SMLT for substitution do you propose?

    Hi jan Bo ,
        Did you check the option expert mode:
        If you want to supplement a more precise selection of tables, application tables, for example, use the expert mode of the language supplementation program.
    Proceed as follows:
    1. Choose the following for the language that you want to supplement: Language u2192 Special Actions u2192 Supplementation (Expert).
    2. On the next screen, enter a description of your supplementation. This helps you to recognize the supplementation you have started in the transaction SMLT overview.
    3. In the center of the dialog box, you can specify conditions for selecting the tables you want to supplement. These fields are set with SAP defaults, however, you can change them by choosing Change. The default is set so that if you are logged on to client 000, all cross-client and client-specific tables are supplemented in client 000. In other clients, only the client-specific tables in the logon client are selected for supplementation.
    4. The tables that you want to supplement appear at the bottom of the screen, according to the selection you made by choosing Select. Each table is shown with its table class, a description, the supplementation mode, and the client in which the table will be supplemented. You can use the appropriate pushbuttons to change this list, however, we recommend this for experienced users only.
    You can find this with link :
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/ac5b5193-0701-0010-45a7-98dd573a6785
    under section :
    6.2 Language Supplementation................................................................14
    6.2.1 Starting Language Supplementation..........................................................................15
    6.2.2 Language Supplementation (Expert Mode)................................................................17
    Could you please also check the the below post :
    Re: Complete Language Supplementation ?
    chek the below link for search.... it would also help you for next search
    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=supplementingLanguage&adv=true&sdn_author_name=&sdn_updated_on_comparator=GE&sdn_updated_on=&start=11
    i also suggest you to check with target client on which you installed language at last.
    Regards,
    S.Manu.

  • Opening User defined Fields Form via API

    Hi
    Is there a posiibility to open those user defined field - forms via API. If yes is it possible to check if it is already open?
    TIA
    Phile

    Hi,
    In your eventhandler, you can use this:
    Set oSboForm = Sbo_application.Forms.GetFormByTypeAndCount(-pval.FormType, pval.FormTypeCount)
    form and udf-form are linked through a minus sign.
    I do not know of a nice way to check if they are anebled. What I'm currently doing is running the above line of code contained in an error handler. The error handler does a sendkeys of control shift u (which enables the udf-form) and displays a message. Problem is after control shift u, screen is not yet updated so your code cannot continue immediatelly. Development knows of this problem, but I never received a promise when this will be fixed.
    Hope this helps,
    Jacques

  • How to get User Profile Service information on user OTHER THAN current user?

    So much information on how to autopopulate information for the current user or the logged in user in InfoPath.  But what about other users?  What if there's a field that's 99/100 times going to be the same person, but it's not the person that's
    logged in? 
    I would like not just to autopopulate a person field to be a specific user (which is not the current user), but I'd also like to autopopulate surrounding fields for that user's Title and Department. 
    For instance, consider the following 6 fields.
    1. Current User Name:  
    2. Current User Title:  
    3. Current User Department:
    4. Current User’s Supervisor’s Name:  
    5. Current User’s Supervisor’s Title:  
    6. Current User’s Supervisor’s Department:
    I know how to get the first three; the internet is swarming with that information.
    I'm struggling the last three; searching for this information is impossible without turning up information on current user instead.
    The furthest I've gotten so far is to autopopulate Current User's Supervisor's Name by:
     1. Show Advanced View on Fields pane
     2. Expand my Field (which is really a group) called IT Manager Name
     3. Expand what shows up under that which is pc:Person
     4. Right click AccountId and choose Properties
     5. Set Default value to [our domain]\[IT Manager's ads username]
    This solves how to get that 4th field my example list above Current User's Supervisor's Name to autopopulate, but how do I then get the Title and Department from the value I set in step 5 [our domain]\[IT Manager's ads username]?  Or is there a different/better
    way altogether to go about getting a non-current user's info to autopopulate in InfoPath form fields?
    *UPDATE*
    I just want to clarify that I'm not asking if there's a way to autopopulate the current user's supervisor.  I'm aware that Manager is one of the User Profile service fields.  But the point is that  I want to have a field in which the current
    user fills in a username (different than his or her own), and to have User Profile Service called on that provided username to autopopulate Title and Department in surrounding fields.  The question is about how to call information with User Profile Service
    on any provided username, specifically what steps to take to set this up in InfoPath Designer.

    Have a look at the REST API. You can use the /_api/sp.userprofiles.peoplemanager/getpropertiesfor endpoint to query the user profile service for user profile properties of any user. 
    The API is documented here: https://msdn.microsoft.com/en-us/library/office/dn790354.aspx and here https://msdn.microsoft.com/en-us/library/office/jj163800.aspx
    Regards, Matthew
    MCPD | MCITP
    My Blog
    View
    Matthew Yarlett's profile
    See my webpart on the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here:
    Upload and Crop User Profile Photos

  • How to get multiple selected fields in list

    Hello all,
    I am trying to get multiple selected value from a list but i dont know how to get multiple selected fields from a list though AS3.
    Actually i want to pass the selected fields to php, so for that i need to get the selections and send to php.
    Thankx..

    i want to put the selected fields of list in an array through AS3....
    actually......i figured it out how to do that...........
    Its simple......use
    list.selectedItems[index]
    and to get the number of items selected......
    list.selectedItems.length
    simple.....

  • How to get Employee Picture in Smartforms

    Hi Experts
    Please help me out in getting employee picture in Smartforms
    I have used the following FMs
    1. HR_IMAGE_EXISTS
    2. SCMS_DOC_URL_READ
    By using these two FM i got the URL and i am able to get the picture in my Report Program,by using FM 'ISM_URL_SHOW'.
    But Please tell how to get this picture in Smartform .
    As i am generating Employee Biodata and in that i need employee Picture.
    Please HELP me ....
    Thanks & Regards
    Shaveta Prabhakar

    Hi,
         U need pictures in smartforms for that just try this one I think so it will help full to u.
          First Upload that picture in the se78 that photo must be in the bitmapformat(picture.bmp).
    steps are:
             goto se78>graphics->import--->it asks the file path here,fill those details
    Then goto Smartform--->In which page u want to put the picture,
              there click that page  and goto Background picture,
             here give the name of that picture and select the resolution and positin of the picture there. 
               Then u will get the picture in the output.
    Regards,
    Surya

  • How to get User input in JTextField?

    How to get User input in JTextField? Can u anyone give me some code samples? thanks

    read the API!!!

  • How to map user-defined fields in XML communication on SRM site

    Hi All!
    We use the External sourcing scenario and we transfer requirements from ERP  in SRM through XI (PurchaseRequestERPSourcingRequest_In)
    We should transfer the user-defined fields, but we can not map it in SRM site.
    We have enhanced enterprise service in XI, have realized BADI PUR_SE_PRERPSOURCINGRQCO_ASYN on ERP site.
    I see the XML message with ours z-fields in tr.  SXI_MONITOR (into SRM), but I can not find it in BBP_PDISC.
    We try to use BADI BBP_SAPXML1_IN_BADI (there is no method for SC), and BADI /SAPSRM/BD_SOA_MAPPING (z-fields is empty)
    Someone can tell how to map user-defined field for SC?
    Thanks in advance
    Evgeny Ilchenko

    Hello, Julia
    We have found solution our problem
    We have enhanced standard service in a new enhancement name space and defined own enhancement elements in our namespaces. Then these enhancement elements refered to the SAP standard Enterprise Service.
    But In our new interfaces were different  XML namespaces
    When we have correct an error we could use the next BADI
    on ERP site: PUR_SE_PRERPSOURCINGRQCO_ASYN
    on SRM site: /SAPSRM/BD_SOA_MAPPING
    BR,
    Evgeny

  • How to get user input to keep in array in the form of int[]?

    I really want to know how to get user input to keep in an array. Or if it's impossible, can i use the value in "int" and transfer it to an array?

    What I understand is that you want to set an input from the user in an array of int.
    Here is how it work:
    1. Create a stream and a buffer to get and store the informations entered by the user:
    BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
    2. Set this input in a String:
    String input = stdin.readLine();
    3. Set this string in an int:
    int userInput = Integer.parseInt(input);
    4. Then you can put this int in the array.
    Warning this code throws IOExceptions and NumberFormatException ( when you try to set letters as int ). But you can catch them easily.

  • How to remove User Defined field in programitically

    Hi,
           How to remove user defined field in programitically. send the code
    Thanks,
    P.Suresh Kumar

    Hi,
    Please take a look at this thread:
    Re: Can't remove a user defined field with DI API.
    Kind Regards,
    Owen

  • How do I make memo fields avalible via a Universe?

    How do I make memo fields avalible via a Universe? I have several memo fields in the table I want to publish via a universe except each time I build the universe and export it, all the fields are avalible except the memo fields.
    Any help would be appreciated.
    Thanks
    Jeff

    Yes I tried it manually and it still does not give me the memo field.
    I went into the designer, created a derived table with a simple query
    select potran.purno, potran.intmemo, potran.item
    from potran
    Then checked the limit of long text and unchecked that so there is now no limit. Then when I move the derived table to the left pane in the designer, I only see the two fields, purno and item. The memo field is missing.
    Thanks
    Jeff

  • HT4236 How can get the pictures from my iPod to my iPad without a computer?

    How can get the pictures from my iPod to my ipad without a computer?

    Then there is absolutely no way to get the pictures from the iPod to the iPad unless you import them to your computer and then import them inor iTunes and sync them to the iPad.
    Where did the pictures come from? Which iPod version do you have?

Maybe you are looking for