SharePoint List 'NoCrawl' with Graph API - sharepoint

The SharePoint API to GET a list, shows the boolean property 'NoCrawl' in its response. This property can be set by altering the settings for the Search availability and Offline access through the settings.
GET https://{site_url}/_api/web/lists/GetByTitle('List Title')
However the Graph API counterpart doesn't have this property.
GET https://graph.microsoft.com/v1.0/sites/{site-id}/lists/
Update - Seems there is no way right now other than using the old SharePoint API itself. I'll keep the question open if in case the feature in inculcated.

As Shiva updated there is no such property called NoCrawl as of now in the public document and any relationship for expanding even in beta. Being said that I remember a related thread which works in SharePoint online rest api, which you may want to give a try with Microsoft Graph and see if it helps your scenario.

Related

How to apply a sensitivity label to a document in SharePoint Online programmatically?

The task is to write a code that applies a sensitivity label to a document in a SharePoint Online document library without downloading the file.
I have explored the following APIs so far:
SharePoint REST API v1: Can be used to set a Retention label but not a Sensitivity label.
Microsoft Graph REST API: Can’t find any public methods for setting any labels in this API. All label-related properties seem to be read-only.
Microsoft Information Protection (MIP) SDK: Sensitivity labels can be applied to a local file. A stream (e.g. memory stream) is also accepted as input/output so it is possible to apply labels in memory. But it still requires downloading the file from SharePoint.
#P-39 Airacobra
Can be done by PowerShell script:
https://learn.microsoft.com/en-us/microsoft-365/compliance/sensitivity-labels-teams-groups-sites?view=o365-worldwide#use-powershell-to-apply-a-sensitivity-label-to-multiple-sites
But I'm looking for the same, like to apply settings using the unattended way, like REST API, saw something in Microsoft Graph API BETA:
https://github.com/microsoftgraph/powershell-aad-samples/blob/master/ReassignSensitivityLabelToO365Groups.ps1
But not tested yet.
Seems found something, will look later:
https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-site-classification

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

Sharepoint REST API + unable to Update Extended properties

Currently we are consuming Sharepoint 2013 REST API; As per requirement we need to update certain extended properties. e.g. "IsCompleted" property of workflow.
Currently we are using following link for rest api
http://msdn.microsoft.com/en-us/library/office/jj860569(v=office.15).aspx
Can you please help out to resolve this issue.
Thanks in advance
This is a read only property. You cannot update it. There is no setter.
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflow.iscompleted(v=office.15).aspx
And logically too, this property would reflect the current state of workflow. To mark it completed, you would have to complete the workflow.

Display document only to user who uploaded it in sharepoint

I have a specific requirement where-in I want only the uploader of the document and a specific team to be able to view it in list / library. 1) is it possible? 2) If yes, how...?
Ok. So I was able to resolve my issue with the steps mentioned below. Soon will be documenting it in form of a blog and share it:
Created the document library and modified the default view to only show documents that were created by/modified by [Me].
Added a new web page to the library and gave exclusive rights to access that to a certain set of users.
Restricted all users from creating a view with the help of creating special permission level where user only had access to upload or delete a document but not creating/updating/deleting lists/views. Also disabled private view creation.
Hope this may be helpful to others too who are looking for restricted views / disabling view creation.
You need to set item level permission through event handler:
http://www.chakkaradeep.com/post/SharePoint-ndash3b-Setting-Item-level-permission.aspx
http://msdnvietnam.net/blogs/quang/archive/2009/07/02/sharepoint-eventhandler-set-item-level-permission.aspx
#Ashish, in SharePoint 2007 GUI you cannot make a query that will show documents that belongs to a specific group, however CAML specification supports it (Membership tag), it wasn't documented until SP2010, but it works on SP2007 (i'm using it)
However this involves custom coding and this doesn't assign permissions automatically, it just enables you to filter documents by groups.
For a solution without custom coding you could consider making a seperate folder/list for every person/group and set permissions to folder/list accordingly. This will also help performance - it's better to have permissions set on high-level container than having fine grained permissions (i'm just assuming that, because i read everywhere that mass fine-grained permissions are bad for performance)
You may use current user filter web part to filter the document by whom logged in into the sharepoint site by passing the value Dispaly Name

Sharepoint: Best way to display lists of non-Sharepoint content with "compatible" UI?

I've built a web part for Sharepoint that retrieves data from an external service. I'd like to display the items in a way that's UI-compatible with Sharepoint (fits in with its surroundings.)
I'm aware of the "DataFormWebPart" but was unable to get one working properly. It requires a valid DataSource and I was unable to build one from the results of a web service call... Part of the problem is that my web service wrappers don't expose the XML return info, rather I have a bunch of deserialized objects. There doesn't seem to be an easy way to turn actual objects into a datasource, or populate a "generic" datasource from object data.
I could use an SPGridView to get the same UI, but the grid control doesn't have much in the way of smarts -and- it forces every field into its own column. I'd prefer to render each list item as a single cell with complex rendering (for instance the way that StackOverflow shows its lists of questions.) I'd also like to get as much of the Sharepoint-standard UI as possible, such as the sorting, filtering, and paging controls.
So, first: Has anyone here written a Sharepoint control that does this, and if so do you have sample code to share? If not: am I overlooking some useful control, whether MS-supplied or available in an external library?
Thanks!
Steve
Sharepoint: Best way to display lists
of non-Sharepoint content with
“compatible” UI?
Take a look at the built in sharepoint web controls:
Microsoft.SharePoint.WebControls Namespace
It contains all the controls used in sharepoint. I'd tell you more, but the documentation is very thorough.
Problem with SharePoint is that there are a bunch of different ways to do this. If your data is not changing too often and is not overly large it may be worth considering entering it into a list for display.
If you have the Enterprise licence it may be worth getting your data into the BDC and using it there.
you may have to convert the objects into xml or use the serialised objects with the XML webpart for display. This still has the issue of custom rendering using XSLT.
Here's a great article that explains how to configure BDC connections to web services using the BDC Definition Editor:
Creating a Web Service Connection by Using the Business Data Catalog Definition Editor
http://msdn.microsoft.com/en-us/library/bb737887.aspx
The best way to do this IMO is to make a Web Part. As a Web Part the UI will be automatically rendered to be the same as the theme the site is using (unless you override it) and it will be able to be placed anywhere by anyone with admin privileges.
Tutorial on making a Web Part
Tutorial on packaging and deploying a Web Part
Example Web Part Source Code
You could create a custom web part and use an SPGridView. You say you don't like it, because it forces every field into its own column, but that's not true. You can create a template (ITemplate) for every column and fully customize what's shown inside it, just like you would using a normal ASP.Net GridView. Using this approach I've added the little "New" images right next to a list item's Title, just like SharePoint does itself.

Resources