Searching with Office 365 Unified API - search

I am having trouble using the new Office 365 Unified API for searching for email. I would really appreciate it if I could get some help.
I get the following error:
{"error":{"code":"ErrorInvalidArgument","message":"The value specified for search scope 'PrimaryMailbox' is invalid."}}
I was able to get the access token for graph.microsoft.com and retrieve all the messages from my inbox by doing a GET to "https://graph.microsoft.com/beta/me/messages".
However, when I add the search parameter $search="Tomcat", I get the error copied above. Any ideas how I can resolve this? Is there any documentation to clarify this? I have searched the Office Dev Center documentation in detail but could not find anything to help with searching in the Unified API. Eventually, I want to use the Unified API to search for users' contacts, calendar entries, OneDrive files, and SharePoint online.
On a related note, I can successfully search for mail messages using the existing Office 365 API by making a GET call to "https://outlook.office365.com/api/v1.0/me/messages". However, I am more interested in the streamlined Unified API approach and hope I can resolve the above issue.
Also, is there a way to search all mailboxes in a single search using either the existing API (https://outlook.office365.com) or the new Unified API (https://graph.microsoft.com/)?
Thanks.
Mohammad
San Jose, CA

The Unified API preview documentation lists all supported query parameters, and $search isn't included. It does support $filter, so you can do some basic searches using that.
The Mail API does support $search, but there is no way to search across multiple mailboxes in one query.

You can use the below conditions for searching in outlook
to search in particular folder(Ex: Drafts,Inbox)--/me/MailFolders/Inbox/messages?$search={1} : where 1 will be your search text
If you want to search in all folders then /me/MailFolders/Allitems/messages?$search={1}: where {1} is the text you want to search

Related

Which SharePoint API to use JSOM or REST?

I am a SharePoint novice and need help to determine which api set to use. I have given task to develop an outlook web add-in which will be side loaded to client's computer. This add-in will perform search on SharePoint lists and access content types and allow to move emails to SharePoint.
I have two options from what Choose the right API set tells me, REST OR JSOM.
It says to use JSOM but I am favoring little towards using REST.
My Concerns using REST is if it supports
External content types. I used Microsoft.BusinessData.MetadataModel.Entity in .NET CSOM?
Managed Meta Data/TaxonomyFieldTypes?
Are there any benefits of using one on another?
Really appreciate any comments or suggestions :)
Thanks for reading.
Yes,rest support both of them.
rest update managed matadata:
https://github.com/SharePoint/sp-dev-docs/issues/4758

Need to find reports on Search. E.g. Top searched keyword, categories

I am using Azure search where it creates index on my database tables and shows results as expected.
Now I have a requirement where I need to find-out what are the words or items users have searched most or what was the pick time for search.
Is it possible to find any such reports with Azure Search?
Either by its portal or using the API or Code?
I'm on Azure Search team, thanks for using the service. Currently it's not possible, however, we understand the importance of this feature and we're working to deliver it. No exact dates yet. For now, you'd have to collect and aggregate the information you need on the client side.
For feature request like this, feel free to use our User Voice page to help us prioritize work: http://feedback.azure.com/forums/263029-azure-search

Sharing unsharing files/folders etc via REST API for Sharepoint

Is there any way we could share/unshare a file or folder with users (external or internal) through REST API?
I am unable to find proper documentation for this. The only information out there is for update, delete, create, download, upload, and read operations!
I have come across some posts which indicate that it's possible to update the fields for a listitem. I was wondering if I could achieve sharing/unsharing through that?
If not sharing then at least unsharing(remove sharing details which ultimately unshares the item). Can unsharing be achieved through this?
I asked a colleague who is more familiar with the Files API than I am, and he said no file sharing properties are exposed via the Files API for Office 365 - so it looks like it's not possible at this point with that API. You could file a request to add that functionality via User Voice feedback page.

sharepoint 2010 search not returning results

I have searched unsuccessfully for a number of days to try and resolve an issue with the search not returning results in Sharepoint 2010. Basically the search has successfully crawled the content and indexed the results but the search is returning no results on our site.
The codebase is the same as other servers that does return results so we are confident it's not a coding issue, but is a sharepoint issue. We can reach the search queryex webservice also
I was wondering if anyone had any suggestions on possible settings / things to check to try and kickstart this search!
This is my first question on stackoverflow, so please advise if I haven't added enough detail.
I'm fairly new to SO myself, but I'll help if I can! Quick couple of questions:
Is the search returning no results for all user types, including admin?
Is there an error returned when you submit a search or does it just say "no results"?
Are you using any custom web parts for displaying the search results, or is it OOB?
Do you have access to the ULS logs perchance? There may be further information there.
Are you using search scopes at all?
What domain account are you using for the search app pool? There's some info here about making sure you have the right type of identity - SharePoint 2010 search crawling but not displaying results
(Apologies for posting a comment-as-an-answer, but since my rep is below 50 I can't yet post comments on your question - still wanted to help though.)

How integrate google search into microsoft dynamics crm?

We are using Microsoft Dynamics CRM but a lack of Google like search engine is crippling our productivity. We have nearly 10 years of data but without a good search engine we end up rediscovering solutions.
I was wondering if it is possible to integrate custom Google search to our MS dynamics CRM? If it is possible, how do I go about solving this problem? Any pointers would be helpful.
You can implement a Google/Web search fairly easily by using an HTML web resource. Just go to the search engine you want to use, type in some search text and search for it. From the search results copy the URL. If I search Google for "bacon", this is the URL I get -
http://www.google.com/#sclient=psy&hl=en&site=&source=hp&q=bacon&pbx=1&oq=bacon&aq=f&aqi=g5&aql=undefined&gs_sm=e&gs_upl=1252l1954l0l5l4l0l0l0l0l238l673l0.3.1l4&bav=on.2,or.r_gc.r_pw.&fp=707818aceea98c40&biw=950&bih=934
In the HTML web resource, you now just need to create a textbox and a search button and wire it up so that when you hit search it generates the URL above replacing "bacon" with whatever was typed in the search box. You can use a javascript window.open(url); to get it to spawn the window with the search results.
Don't know too much regarding a custom Google search, but Leon Tribe (a MVP) has posted a couple of blog posts recently on how to create what he calls a "universal search" facility in CRM - all done using the standard configuration tools within CRM (no custom code required).
It still uses the built in CRM search logic, but rather than searching only across an individual entity, his solution provides an ability to search across multiple entities (including custom ones) from a single search query.
Possibly not the ultimate answer to your problem, but might give you some ideas on something relatively simple to setup, with some degree of improvement, while you investigate more comprehensive options.
The links to his blog posts as follows:
http://leontribe.blogspot.com/2011/06/slightly-more-elegant-codeless.html
http://leontribe.blogspot.com/2011/06/codeless-universal-search-for-dynamics.html

Resources