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]

Similar Messages

  • Any way to get all users's user profile proeprty using CSOM c# for sharepoint online - office 365?

    Any way to get all users's user profile proeprty using CSOM c# for sharepoint online - office 365?

    Since CSOM provides methods for operations related to people per
    user scope, you could retrieve all site users first using SP.Web.siteUsers
    property. and then use SP.UserProfiles.PeopleManager.getUserProfilePropertyFor
    Method to get property.
    [custom.development]

  • How to get sharepoint online (office 365) data in cloud/windows azure (provider) hosted app using Javascript?

    How to get sharepoint online (office 365) data in cloud/windows azure (provider) hosted app using Javascript?
    I wish to retrieve sharepoint online data in html page (hosted in windows azure) using javascript and then need to play with AngularJS

    Hi,
    According to your description, you might want to get data from Office 365 SharePoint Online(also known as host web) and pass to the Provider Hosted App which is hosted
    in Windows Azure site.
    I would suggest you take a look at the links below about accessing data from the host web
     for a quick start:
    https://msdn.microsoft.com/en-us/library/office/fp179927(v=office.15).aspx#SP15Accessdatafromremoteapp_Codeexample
    http://dannyjessee.com/blog/index.php/2014/07/accessing-sharepoint-data-from-provider-hosted-apps-use-the-right-context/
    Aother sample solution for your reference:
    https://code.msdn.microsoft.com/SharePoint-2013-Get-the-0ec36bb6
    Best regards
    Patrick Liang
    TechNet Community Support

  • Creating High trust provider hosted app in SharePoint online

    Hi,
    I need to create high trust provider hosted app for SharePoint Online. provider hosted would be not going to host in Azure but it will be some where else.
    some kindly provide step by step that how to create High trust app for SharePoint online but not for SharePoint 2013.
    Kaps

    check this link
    http://msdn.microsoft.com/en-us/library/office/fp179901(v=office.15).aspx#Intro
    A high-trust app for SharePoint is is primarily intended for use in an on-premises environment. The high-trust
    app cannot be installed to Microsoft SharePoint Online, and the remote components are typically installed on premises, too, within the corporate firewall. Thus, the instances of the app for SharePoint are specific to each individual company.
    Kind Regards, John Naguib Technical Consultant/Architect MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation

  • Office 365 Files REST API - Get direct children in the root of the default document library

    I'm trying to work with Office 365 Files REST API which works just fine except one thing that I'm struggling with.
    What I need for my application is to make an explorer like browse capability for OneDrive for business Document Library.
    My problem is that I don't know how to get the direct children in the root of the Document library
    The API request
    GET ../_api/files will
    retrieve all files and folders in the default document library, including files and folders from sub-directories.
    What I need is basically the functionality of the API request
    GET ../_api/files(<folder_path>)/Children
    that works also for the root folder of the Document library. The problem is that I couldn't find a way set <folder_path> as the root folder. 
    I found out that the API call ../_api/web/getfolderbyserverrelativeurl(<folder_server_relative_path>)/Folders and _api/web/getfolderbyserverrelativeurl(<folder_server_relative_path>)/Files works as expected resulting the only the direct
    children of the root folder if the folder_server_relative_path is the path of the document library. The problem with this API call is that it's requires server relative path of the (default) document library (which i don't have) and the result has a different
    schema compared to the ../_api/files REST API call.
    Can somebody help me with this problem?
    David

    First thanks for the fast answer. Let me explain my use case in more details.
    I'm trying to work with the new summer release of the
    Office 365 API tool for Visual Studio 2013 (update 3)
    I found no reasonable way to retrieve the direct children of the root folder from my One Drive for business Document Library using the newly added SharePointClient library.
    The API call of `SharePointClient.Files` will retrieve all the files and folders from the whole document library including sub-folders. So in order to get only the direct children I have to page through all the documents and folders and analyze their URL, which
    is not acceptable for my application scenario. For a sub-folder I can get the direct children like this: `SharePointClient.Files["<folder_id>"].ToFolder().Children` This is what I need but it can't be applied to the root folder.
    So what I did I've checked what REST API calls this library makes and I've tried to find out if there is a way to achieve my goal at least using direct REST API call. It seems like the functionality is missing from the REST API itself. 
    The http://site
    url/_api/web/lists/GetByTitle(‘libraryname’)/items API call also retrieves all the items hierarchy from the library (including items from sub-folders) and the result XML "schema" (fields and the meaning of the ID) differs from the one used
    by the calls by SharePointClient library. (for example the "Id" is a number when the /items is called but when
    /_api/files is called the "Id" is the relative path to the document library)
    Basically what I need can be achieved with the call to http://site url/_api/web/lists/GetByTitle(‘libraryname’)/rootfolder/files and http://site
    url/_api/web/lists/GetByTitle(‘libraryname’)/rootfolder/folders but again the schema of the result differs from the one used in SharePointClient
    library. This means that in order to get  the direct children of the root I will need to re-implement a good part of the SharePointClient library. It seams like there is 2 kind of REST API is implemented. ( missing  "Id" and "url"
    fields, etc)
    Also there is no convenient way to get the Name or the GUID of the default document library which the SharePointClient.Files
    (https://site_url/_api/file) automatically
    uses. The DiscoveryContext.DiscoverCapability for "MyFiles" doesn't gives any hint either.
    David

  • How to change Site Share mail template in SharePoint online (Office 365)

    Hi,
    I want to change the default mail template used in SharePoint Online (Office 365) which is as follows
    I want to change the logo of microsoft with my custom logo and message below that logo.
    How could i do that?

    in Office365 SharePoint Online, if you wan to customize the alert template you need to customize the Alerttemplates.xml under 14 folder on Online server, but it is not permitted, check this article you
    also have seen.
    You can also post this question related SharePoint Online in dedicated Office365 SharePoint Online forum, you can get a better assistance there,
    http://community.office365.com/en-us/forums/151/categories.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/0d31bb5d-d46b-425a-9f48-6100404b95d8/sharepoint-online-custom-alert-emails?forum=sharepointcustomizationprevious

  • How to install app using powershell in sharepoint online - office 365?

    How to install app using powershell in sharepoint online - office 365?

    Hi
    check this similar post
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/1f0cd45a-00e1-4452-bafe-83c6ee3a59db/can-i-deploy-a-sharepointapp-to-office-365-using-powershell?forum=appsforsharepoint
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • 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 user profiles and tasklists in axf

    Hi,
    We have configured the the views in the BPM Worklist ,restart all the managed servers like SOA Server,IPM Server and UCM Server.
    After that navigate to url-http://ipm:16000/imaging/faces/Driver.jspx to configure command driver input parameter settings-like SolutionNamespace     
    CommandNamespace     and provide the username.
    After clicking on Execute request it generates the conversation id but when we clicked on Execute Response button the AXF Task lists and user profile fields are empty.
    can anybody suggest the way to get user profiles and axf tasklist?
    Snehal

    Assign proper groups and/or users to BPM view created.
    In IPM login and logout for that user. It will start appearing.
    Regards,
    Vikrant Korde

  • How to import user profiles from external sources(other than AD) into SharePoint

    Hi,
    I want to import user profiles from external sources other than AD.
    Badri

    You have to use BCS for importing the profiles,
    Check the following link with explanations
    http://msdn.microsoft.com/en-us/magazine/ee819133.aspx
    Please Mark it as answer if this reply helps you in resolving the issue,It will help other users facing similar problem

  • Template reference not getting reflected after Creating WSP file of SubSite in SharePoint Online ( Office 365)

    Hi all,
    I am following below Steps:
    Going to Library Setting.
    After Click on Some Custom Content Types in content Type section.
    Click on
    Document
    Set settings in Settings.
    Brows and Upload Document Template in “Default Content” Section.
    Click OK.
    After Uploading Default Template I want these uploade template in my newly created Sub site  (After saving Site as Template) which is created with wsp.
    When i  create new subsite i am not getting Default Content which have brwsed and Uploaded in Contenten Types.
    Please Give some idea regarding below Screen Shot.
    Thanks In Advance. Your help will be heighly appreciable.
    For example i have given Document Link from any Library/List but not getting that link in new subsite which was created  with wsp.
    Thanks In Advance. Your help will be heighly appreciable.
    Thanks,
    Vivek Pandey

    Hi Christoph,
    From the article you mentioned, it needs add JPG file type to Search Service Application, which was not supported for SharePoint online.
    I tried to add Picture content type to normal document library and tested the issue, it still displayed as item in Search results.
    However, if I created a Picture Library and add Document content type to it, both image and document can be previewed in search result.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to get user profile details using first name and last name of the user?

    Is it possible to get profile details using firstname and lastname of the user with SharePoint UserProfile service?
    any thoughts?
    SP 2010 is history SP 2013 is mystery :)

    You could try the search method of UserProfileManager.
    https://msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles.userprofilemanager.search.aspx
    SPServiceContext serviceContext = SPServiceContext.GetContext(SPContext.Current.Site);
    UserProfileManager upm = new UserProfileManager(serviceContext);
    string[] searchPattern = { "Firstname", "Lastname"};
    ProfileBase[] searchResults = upm.Search(searchPattern);
    foreach (ProfileBase profile in searchResults)
    //Do something
    //Console.WriteLine(profile.DisplayName);

  • How to fix Workflow failed to get user profile for user:

    hi All,
    How to fix Workflow failed to get user profile for user when using Lookup function in sharepoint designer?

    Try to use “As string” instead of “Login Name” for the “Return field as”.
    Regards,
    Jayant
    jayant prabhakar

  • Best way to create a conact list from the user profile properties

    We have a customer looking for a phone book utility, starting with a table showing main user information and with some search options. We would like o base it on the user profile properties and not to create an indipendent studion record browser porlet.
    What is best way to create a conact list from the user profile properties ?

    I did something like this using search.  It can get messy, so you need to take care with it.
    * Identify the properties you want to make accessible to search (ex: name, etc.)
            - add them to the user property map
            - flag them as searchable
    * I broke down and used the native server API.  I'd still suggest this approach.
    * Write some simple code to do vcard export if you like
    (my code is all in vb.net)
    I really believe this is the &#034;right&#034; approach, but honestly, this was a bit painful and has been
    messy for us given some other business issues.  (to my chagrin we have users with 2-letter last
    names...)
    I have code you're welcome to poke at, but it's more or less slapped together and has various
    different search methods commented out so you can see how I tinkered w/ the remote vs. server
    API.
    If you'd like it mail me at [email protected] and I'll send you a zipped copy w/ a
    readme.  I hope it may be useful to you as both a starting reference.

  • How to stop user profiles clean-up job from deleting Active users.

    Hi,
    Somehow bunch of active users profile are marked for deletions and their managers have received email saying it will be deleted in X days.
    I know if we disable My Site Clean Up Job, it will not delete any profiles. But I want that job to continue running and stop active user profiles from getting deleted.
    How do I proceed here...
    Thanks,
    Abhilash

    Hi Abhilash,
    I understand SharePoint 2010 MySite clean up timer job is deleting active user profiles.
    Firstly, I need to confirm with you that the timer job will work on below two situations:
    1.When you use the web UI in Central Administration to delete a user profile
    2.When a user who was included in a previous user profile import is no longer included in the import. 
    The second point bears a little more explanation, please refer to How Is A User Profile Deleted?
    in the article below:
    http://blogs.msdn.com/b/kaevans/archive/2012/06/25/top-recommendations-for-managing-the-my-site-cleanup-timer-job.aspx
    Let me know if you situation is not included in the above two.
    Regards,
    Rebecca Tu
    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]

Maybe you are looking for

  • Can't open Mozilla FF in Program Files

    I print the NY Times Crossword every night. Since I got my new computer (Windows 7 Home Premium, 64 bit, Firefox 3.6.10) my bookmarked Puzzle link causes FF to crash every time. In this forum I thought I found the fix. It said to go to Program Files/

  • Windows 7 Install Issues with Mac Pro

    I have Mac Pro with Windows XP SP3 installed with Boot Camp on a separate, dedicated 250GB HD. I purchased an upgrade version of Windows 7 Home Premium. I hoped to install the 64-bit version. I upgraded, per Boot Camp I&S Guide, Boot Camp to version

  • Win 8 Pro Recovery

    Hi I can not get to HP for assistance... Warranty expired. I have a HP Pavilion G7 laptop. I had a crash and lost my OS Win 8 Pro w/MCenter  and need a revovery disk. The one I made when I bought the laptop 1 1/2 years ago...has no Boot info so it is

  • SMARTFORM GUI_DOWNLOAD PDF error opening Adobe document

    When attempting to open Adobe document from Smartform converted to pdf using CONVERT_OTF and GUI_DOWNLOAD I get error.  The abap completed each step with no errors and oddly the final pdf file created to PC was either 10 or 15 Mb even.  The 15Mb vers

  • How do I open a TIF image email attachment using windows photo gallery as the default instead of microsoft office picture manager?

    I have an internet fax program that sends faxes directly to my email as a TIF image attachment. When I download the attachment it lists Microsoft office picture manager as the default program to view the image. I would like to change the default prog