I'm using kql to search files in a sharepoint online using CSOM in a sharepoint add-in. It works so far until 29th january 2021
I noticed that using the method new sharepointonlinecredential, passing username and password works.
I get the context using the tokenhelper class with GetClientContextWithAccessToken (suggested method for authenticate sharepoint add-in).
Could you help me?
Please make sure you add the QueryAsUserIgnoreAppPrincipal permissions for search add-ins:
https://learn.microsoft.com/en-us/sharepoint/dev/general-development/search-add-ins-in-sharepoint#search-add-in-permissions
Related
This is my first post here, and I hope someone can help me. Please feel free to ask for more information about my question if needed.
I am currently working on a project to migrate a Sharepoint 2010 solution to Sharepoint 2019, and right know I am handling the development part of the project. I am quite new to Sharepoint development, so I have some questions that might seem basic.
I am trying to replicate one feature from this old project and create a new one in this new Sharepoint 2019 project. The method consists of querying the Project's Permissions through PSI, using the Security WCF service. (with the "ReadProjectCategory" method)
However, I have read online that the PSI is discontinued in 2019, so I am trying to implement this method using CSOM, but I can't find the correct method to look for this information (the image shows exactly where the data is).
Can someone please help? I can't find anywhere how to get this data over CSOM or OData.
The page url is: //Sharepointurl/PWA/_layouts/15/PWA/views/ProjectPermissions.aspx?_projectUID=[ProjectGUID]
Thank you!
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
I have a custom list in my SharePoint 2010 website. When I am adding a new item to a custom SharePoint 2010 list, I want to auto populate data from active directory in the respective fields (other details of the user) when I enter the exact user Id in the first field and I will also like to send the field content as an email.
- I understand that I can do this easily with MS Infopath, however my organization use the SharePoint standard edition which does not support creating forms using MS Infopath and creating a custom webpart is also not allowed by the company standard.
Can it be done through SharePoint designer or any other way besides out of the box options. Will gladly appreciate you guys help..
This cannot be done in SharePoint 2010 without creating an InfoPath form or publishing a solution. You can use a people picker field to get some user data, but you cannot make it fill in other fields. If you upgrade your SharePoint to handle InfoPath, you would connect to the User Profile service to get Active Directory data. If you want to publish a solution, you'll need to set up and learn about developing SharePoint solutions in Visual Studio.
SharePoint 2013 has better javascript integration. If you upgrade to 2013 and still desire this functionality, you should come to the SharePoint SE and search/ask for javascript to scrape the User Profile service and to populate fields by default. It might not be possible, but it would be worth a shot.
I've been hunting all day trying to find some good examples/tutorials on how to pull data into Sharepoint 2013 from CRM 2011. The best thing I have found so far is a SP2010 example, but with VS2012 and SP2013 it seems like so much has changed, and trying to make that tutorial work isn't going well thus far.
I have no experience with SP; with CRM I have used the CrmSvcUtil.exe in the past to generate a class and use that within a .NET app in order to view/update data in CRM. I tried implementing this into my Visual Web Part, but I need to be able to add connection strings to the config file which it doesn't seem are recognized by the web part. I see that I can add a service reference to the CRM Organization service but I'm not sure if/how I can use that to query data. Any help is appreciated, or if anyone could point me in the direction of some good documentation. Thanks!
You have got couple of options.
(1) Use SharePoint 2013 client API.
Consume the client API from your CRM plugin / custom workflow to update the crm data to SharePoint 2013.
(2) Consume SharePoint 2013 webservices from CRM plugin / custom workflow.
I don't think this works in sandbox based solution.
I can't seem to toverride a checkout in SharePoint 2010. I am using SP1 and PowerPivot, and an excel spreadsheet is checked out by another user. I have also used the SharePoint Farm Account, still nothing.
Please help!
Try this:
1) go into the document library and make sure the account your using has permission to override if you don't have "full control" set it that way. Test to see if override works if not try #2
2)Check document library settings/versioning settings and make sure content approval is no.