graph
5 TopicsUsing Microsoft Graph to filter on siteCollection property
I want to get a list of all SharePoint sites on the tenant using Graph. But when I make a request, it brings everything including user OneDrives. From the data it seems that you can use siteCollection property to filter the data. siteCollection : @{hostname=xxxxxxx-my.sharepoint.com} - OneDrive siteCollection : @{hostname=xxxxxxx.sharepoint.com} - SharePoint Site I am making requests via PowerShell. So far tried variations of these: $v1/sites?`$select=webUrl,siteCollection&`$search=`"siteCollection:hostname=xxxxxxx.sharepoint.com`" $v1/sites?`$select=webUrl,siteCollection&`$count=true&`$filter=startsWith(siteCollection,'hostname=xxxxxxx.sharepoint.com') $v1/sites?`$select=webUrl,siteCollection&`$search=%22siteCollection:hostname=xxxxxx.sharepoint.com%22 But no luck. Just brings back empty value @odata.context value -------------- ----- https://graph.microsoft.com/v1.0/$metadata#sites(webUrl,siteCollection) {}1.9KViews0likes3CommentsSharePoint Last Activity from Graph vs Sharepoint Admin Panel
When I query report with restAPI against graph: "https://graph.microsoft.com/v1.0/reports/getSharePointActivityUserCounts(period='D180')" for some sites I'm getting different date from what I see in Sharepoint Online Admin Panel - Activity tab - "Last Site Activity". Sometimes the date in Admin Panel is older sometimes newer. Which one is more legitimate?613Views1like0CommentsUpdate Group SharePoint Custom Field Collums after Fileupload with REST Graph API
Hi, I've made an upload with Graph with the following JS code: async function uploadSingleFileMetaToSharepoint(file, name, metaData, groupId, graphAccessToken) { //console.log(file, name, metaData, groupId); //TODO get Filepath from config of App let pathToFiles = 'General' let apiurl = msgraph + `/groups/${groupId}/drive/root:/${pathToFiles}/${name}:/content`; if (debug) { console.log("uploading File: ", file); console.log(`API-URL: ${apiurl}`); } let header = { 'Authorization': graphAccessToken, } let body = file; //TODO catch errors let result = await fetch(apiurl, { "method": 'PUT', "headers": header, "body": body }); if (!result.ok) { console.error("upload file to sharepoint failed"); return } let res = await result.json(); //console.log(res); if (res === undefined || res.id === undefined) {console.error("Die DAtei wurde nicht hochgeladen"); return;} /... } which is working fine. But now i'm struggling to fill the values of the collumns from sharepoint : Does anybody know how to approach this?620Views0likes0CommentsSharePoint Home: Stale results in followed sites - Graph not able to remove
Hi, I was wondering if the following behaviour is the same for you guys regarding followed sites in SharePoint Home: For me, sharepoint.aspx still shows site collections under "Following" that do not exist any more. Well okay, they exist in the SharePoint admin center recycle bin but this shouldn`t be the reason why they`re still being followed, or is it?. I thought I could remove them programmatically through the Graph beta endpoint described https://docs.microsoft.com/en-us/graph/api/site-unfollow?view=graph-rest-beta&tabs=http. Unfortunately, this does not do anything because I`m constanstly getting 207 with no error message. Has anyone ever attempted this before? Thanks for your help.642Views0likes0CommentsShare point site properties to identify site type/template from GRAPH APi
I am having difficulty in identifying a site template type when fetching all sites returned from the GraphAPI, Is there a way to expose more properties for Sharepoint Sites? Like in Sharepoint RESTApi, We get a web_template property that allows us to identify what site it is, Is there anything equivalent in Sharepoint GraphAPI?1.2KViews0likes0Comments