I am having trouble locating the methods to "Check Out" (or otherwise lock) and "Check In" documents in a SharePoint Online library/list using the Graph SDK. I don't actually see the REST calls listed either, but I have to believe they are somewhere, because OneDrive for Business webclient exposes these functions.
Basically, in some version-control scenarios, SharePoint admins and/or designers can "Require Check Out" in the library's Versioning Settings configuration. Editing a document is then a multi-step process, one of the first steps is to "Check Out" the document from the library so it is locked for edits to the current user. I can not find this method (and the mirror method "Check In") in reviewing the REST docs or the Graph SDK source code on GitHub. These methods would be required if a library is configured to "Require Check Out".
I have looked through the (Graph)List and ListItem objects pretty thoroughly (including the Versions relationship/collection) and can not locate the methods. I would have expected them to be available on a ListItem object.
If anyone has any code to work with document ListItems in this manner - or simply knows where to find these methods, it would be very helpful.
Those operations are not supported per list items (and in fact never was in SharePoint APIs) but are supported for files in document libraries via DriveItem resource which:
represents a file, folder, or other item stored in a drive. All file
system objects in OneDrive and SharePoint are returned as driveItem
resources.
Documentation:
checkout operation
checkin operation
The following example demonstrates how to checkout a file in document library:
POST https://graph.microsoft.com/beta/sites/{site-id}/lists/{list-id}/items/{item-id}/driveItem/checkout
and check-in it:
POST https://graph.microsoft.com/beta/sites/{site-id}/lists/{list-id}/items/{item-id}/driveItem/checkin
Related
Is it possible to prevent the download and execution of files with a .exe extension using 365? I've searched across Endpoint Manager, Defender for Endpoint and Defender for Cloud Apps but can't see an obvious way of doing this.
Most of my searches suggest using AppLocker but this would only solve half the problem (blocking execution of the file).
Is there any way using Microsoft 365 technology to block the download and execution of files based on their extension?
You can try using Edge's relevant group policy or registry to achieve your needs. I think this should help you. Please refer to this policy document: Allow download restrictions.
It can be known in the documentation that the danger level of exe type files is ALLOW_ON_USER_GESTURE, so you can change the group policy or registry information I mentioned above to 2, which will block potentially dangerous or unwanted downloads and dangerous file types.
And the path of this registry is at: SOFTWARE\Policies\Microsoft\Edge\Recommended, if it doesn't exist, you can create it as REG_DWORD type, set its value will be ok. In the same way, you can do it via group policy.
I want to create a JIRA issue using Logic Apps when a row is inserted into a SharePoint online list. I've authenticated myself, but am getting this error. The main part of the message reads as follows:
Field ‘reporter’ of type ‘user’ is not supported. More diagnostic information: x-ms-client-request-id is ’71…’
The Logic App action is "create a new issue V2". The previous version seems to work OK, but has been deprecated.
The SharePoint list also has some rich text fields. Will I be able to upload them? Looking at the JIRA connector documentation I suspect not, but would like to check.
To resolve this, you need to remove the 'reporter' field from the JIRA Issue Type you are using in the Create a new issue task in Logic Apps.
I am pulling a file from on premise TFS source control using the Rest API. I can't find on premise specific documentation, but it seems to be very close to version 4.1 of the Azure Get Item call. According to this documentaiton, it should return a TfvcItem object which has a lot of metadata including the version. However, when I make the call it only returns the file contents (the content field of the documentation's TfvcItem).
How do I get the current version of the file?
I need the version when I check itin with create changeset. I don't need it for any other reason, so if you know another way to check in an edited file that would help.
Instead of using Get Item API, some related REST APIs are not documented. For these REST APIs we can use tools such as Fiddler or directly press F12 - network in Chrome to track them.
You should use below API to fetch latest changeset version of a file:
post https://dev.azure.com/{organizationname}/{Projectname}/_api/_versioncontrol/history?__v=5
For body:
{"repositoryId":"","searchCriteria":"{\"itemPath\":\"$/MyFirstProject/Main/1.txt\",\"itemVersion\":\"T\",\"top\":50}"}
itemPath is your server path of the file.
From the response, you will get the version info such as "version": "139", instead of the file content.
Not sure your detail version of TFS, I was using Azure DevOps Service for an example. There maybe some difference for different TFS version. You could track the detail API on your own side.
More detail info kindly take a look at this question: VSTS Release API Documentation
Had the same issue. You can get item metadata by specifying "scopePath" URI parameter, instead of "path". Microsoft example in API documentation seems incorrect, as it indeed returns only item content: https://learn.microsoft.com/en-us/rest/api/azure/devops/tfvc/items/get?view=azure-devops-rest-6.0#get-item-metadata-and/or-content-for-a-single-item.
Is there a way using the Asana api to retrieve the project owner, project status, project description and project deadline?
I checked the API docs and could not find anything, so I am assuming the answer is no (but confirmation is much appreciated).
https://asana.com/developers/api-reference/projects#sections
If there is not a way of doing this via the API, does anyone have any hacks on how to do this using something like Selenium or another tool?
Much appreciated.
Project overview attributes are accessible attributes on project objects in the API.
current_status is the latest status update for the project including the color and text associated.
owner the current project owner.
due_date the current project due date.
Created a new Publishing site to serve a portal for our division. It contains several custom coded webparts that fetch data from the db and/or RSS feds and outside links.
I found it absolutely dumb that as a owner I'm having to approve my own page. Is there was to turn off this functionality? Or modifying so that only a document library runs through the approval process?
In the edit mode, there is a link "Reminder: Check for Unpublished Items" and if I click it all of my web parts and all the links, pictures, and other contents within these web parts are highlighted with a fat dotted red line. How do I get rid of this since what sharepoint is complaining about is embedded in these webpart?
If I try to create a doc library called "Announcements" I get an error:
"The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Announcements/Forms/AllItems.aspx"
For some reason it does not like the word, as I can call it BuggsBunny and all is fine. Is "Announcements" a key word of some kind in SharePoint? I really need to create a list with this name.
Thanks,
Risho
I found it absolutely dumb that as a
owner I'm having to approve my own
page. Is there was to turn off this
functionality? Or modifying so that
only a document library runs through
the approval process?
You should choose, when you are creating your site, a "Publishing site" template rather than a "Publishing site with workflows". The main difference between these two is the fact that you'll approval workflow on nearly everything activated with the later while the former is free of it but still allows you to activate it if needed
there is a link "Reminder: Check for
Unpublished Items" and if I click it
all of my web parts and all the links,
pictures, and other contents within
these web parts are highlighted with a
fat dotted red line. How do I get rid
of this since what sharepoint is
complaining about is embedded in these
webpart?
Don't know where you are hosting your webpart ressources (style library, document library, image library ? outside of SharePoint ? On the 12 hives ?) but if they are within SharePoint libraries and the content is not published with a 1.0 version available for the readers, you'll have this error. Deactivate the approval workflow or publish AND approve theses items. Please also note that external content will probably trigger this red link, but I suggest you to use a limited "visitor" account to check up the final rendering. The "outlining" is a nice addition but it's not always working as expected, mainly with external content.
If I try to create a doc library
called "Announcements" I get an error:
"The resource cannot be found.
Description: HTTP 404. The resource
you are looking for (or one of its
dependencies) could have been removed,
had its name changed, or is
temporarily unavailable. Please review
the following URL and make sure that
it is spelled correctly.
There is a default annoucement list in SharePoint (with its dedicated template, not sure that you have one provisioned with the publishing template that you picked, that might be a reason why you have this strange error. The default announcements list or its template is not a document library. If you want a document library with that name, and that specific name gives you that error, I suggest that you create a document library called AnnouncementsDocuments and then change its title for "Annoucements", that way the url will be clean of the dreaded name and you'll have the specified title.
For the error message, have a look within the source of the error message page, you might have, in some comments, more information that might help us to help you.
Hope it will help :)