sharepoint-online

Sharepoint Graph API strange behaviour while trying to get download link for a file

大兔子大兔子 提交于 2020-06-17 15:53:09
问题 I'm trying to get file content. When I'm calling GET /sites/{site-id}/drive/root:/{item-path} Response contains all information about the file, but no @microsoft.graph.downloadUrl field is returned. { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites('domain.sharepoint.com%2Ccc252463-cda2-3eb2-b15e-8836305f1420%2Cc0db7f82-b16f-4fe5-9885-7e434b11e5b8')/drives('b%21k3l2zKLNsk50Log2MF7UIBtTYFV32M5EtW4ZTyYF38gyZs2y-wOfSL0tPWbYys-4')/root/$entity", "cTag": "\"c:{0e8182ec-5ee9

How to create site content type with id using REST API

℡╲_俬逩灬. 提交于 2020-06-17 02:17:05
问题 I want to create new Content Type which will be child of existing Content Type - Workflow Task (SharePoint 2013) using REST API. So when I create request, I include parent Content Type Id in new Id. I have tried following code. const api = '/_api/web/contenttypes'; const requestBody = { '__metadata': { 'type': 'SP.ContentType', }, 'Description': 'This is content type', 'Name': 'TestContentType', 'Group': 'TestContentTypeGroup', 'Id': { '__metadata': { 'type': 'SP.ContentTypeId' },

Issues getting drive information when using the Graph API with a server relative O365 url

£可爱£侵袭症+ 提交于 2020-05-17 06:24:39
问题 I'm trying to download a file located in a M365 site via the Graph API. If I reference the site via "hostname,siteID,webID", the request works via HttpClient, the Graph API SDK and Graph Explorer: https://graph.microsoft.com:443/v1.0/sites/hostname.sharepoint.com,fe0f6782-2cc6-447a-938f-bf6a379ed791,133e22cf-9a72-4ff2-a700-c0accacdcc8d/lists/Documents/drive/items/017TIGYVRADE3TAWYAQZBI3ET6GTHX77QO/content If I try to reference the site via the site relative URL method, the request fails if

Issues getting drive information when using the Graph API with a server relative O365 url

我怕爱的太早我们不能终老 提交于 2020-05-17 06:24:07
问题 I'm trying to download a file located in a M365 site via the Graph API. If I reference the site via "hostname,siteID,webID", the request works via HttpClient, the Graph API SDK and Graph Explorer: https://graph.microsoft.com:443/v1.0/sites/hostname.sharepoint.com,fe0f6782-2cc6-447a-938f-bf6a379ed791,133e22cf-9a72-4ff2-a700-c0accacdcc8d/lists/Documents/drive/items/017TIGYVRADE3TAWYAQZBI3ET6GTHX77QO/content If I try to reference the site via the site relative URL method, the request fails if

Get count of all the subsites (all levels) in all site collections in SharePoint Online using PowerShell

筅森魡賤 提交于 2020-03-05 05:08:24
问题 I'm trying to get all site collections and respective subsites at all levels within the site collection using PowerShell. There are so many posts and references which outline the way but I could not find a post which can provide the count of subsites (all levels again) in a site collection. My environment is SharePoint Online. I need two things: Get the count of all subsites in all site collections in SharePoint Online and export to CSV. Export the list of site collections and subsites in the

Microsoft Graph API Download File content return Unauthorized 401

余生颓废 提交于 2020-02-20 05:28:32
问题 I'm trying to download a file from SharePoint Online using an "app only" token. I can obtain file info using this url https://graph.microsoft.com:443/v1.0/sites/{siteId}/drives/{driveId}/list/items/{itemId}/driveItem But when I try to download the file with this url https://graph.microsoft.com:443/v1.0/sites/{siteId}/drives/{driveId}/list/items/{itemId}/driveItem/content I get the following error 403 FORBIDDEN Content-Length →13 Content-Type →text/plain; charset=utf-8 Date →Fri, 13 Apr 2018

Microsoft Graph API Download File content return Unauthorized 401

与世无争的帅哥 提交于 2020-02-20 05:27:40
问题 I'm trying to download a file from SharePoint Online using an "app only" token. I can obtain file info using this url https://graph.microsoft.com:443/v1.0/sites/{siteId}/drives/{driveId}/list/items/{itemId}/driveItem But when I try to download the file with this url https://graph.microsoft.com:443/v1.0/sites/{siteId}/drives/{driveId}/list/items/{itemId}/driveItem/content I get the following error 403 FORBIDDEN Content-Length →13 Content-Type →text/plain; charset=utf-8 Date →Fri, 13 Apr 2018

Power BI Report Builder - SharePoint as data source

混江龙づ霸主 提交于 2020-02-07 04:14:06
问题 Is it possible to use Power BI Report Builder to connect to a SharePoint list? It seems that it was possible to do that with the old SSRS Report Builder - link. I would like to Build a SSRS-like report with Power BI using different SharePoint lists as Data Sources. I tried to use the Power BI Desktop app to build a report but I couldn't matrix/tables/sections repetitions. 回答1: In the latest update(July 2019) of Power BI Report Builder, you can use NON-PREMIUM datasets from Power BI Service as

Microsoft Graph API - Document library creation with navigation link

旧时模样 提交于 2020-02-06 01:40:34
问题 I am using Microsoft Graph API create a Document Library in a SharePoint Online site. I would like to know if there is a way to create at the same time I create the doc library a navigation link. When working directly on SharePoint online there is a checkbox "Show in navigation link", which will automatically create a navigation link on the left column. I could not find anything in the documentation, I would like to know if there is a way to do that thanks to the API. POST https://graph

Microsoft Graph API - Document library creation with navigation link

送分小仙女□ 提交于 2020-02-06 01:38:46
问题 I am using Microsoft Graph API create a Document Library in a SharePoint Online site. I would like to know if there is a way to create at the same time I create the doc library a navigation link. When working directly on SharePoint online there is a checkbox "Show in navigation link", which will automatically create a navigation link on the left column. I could not find anything in the documentation, I would like to know if there is a way to do that thanks to the API. POST https://graph