microsoft-graph

How to attachment a file to an item in Sharepoint using Microsoft.Graph

跟風遠走 提交于 2019-12-22 12:28:12
问题 Microsoft.Graph Sharepoint api allows to update list item https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/listitem_update using PATCH request. But how to generate a correct request? using (HttpClient pacthClient = new HttpClient()) { var mediaType = new MediaTypeWithQualityHeaderValue("application/json"); pacthClient.DefaultRequestHeaders.Accept.Add(mediaType); pacthClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", userToken); using

Filtering on iCalUId returns empty array if event is part of a series

狂风中的少年 提交于 2019-12-22 11:35:40
问题 My question is nearly identical to this question. I would have just commented over there but am unable to do so due to being a new user. My request to https://graph.microsoft.com/v1.0/me/events?$filter=iCalUId eq '<iCalUId>' returns the event object if I am querying a singleInstance event (this is expected). However, it appears that if the event is part of a series I get back an empty array. I'm not sure if I am missing something or if this is expected behavior. I've scoured MS Graph docs

Regarding admin consent for Group Permission Scope in Microsoft Graph API

大憨熊 提交于 2019-12-22 11:21:13
问题 Currently the Azure AD application delegated permissions "Group.Read.All" and "Group.ReadWrite.All" requires admin consent. Refer: http://graph.microsoft.io/en-us/docs/overview/release_notes /////snip from the below URL///// Group permission scopes The Microsoft Graph exposes two permission scopes (Group.Read.All and Group.ReadWrite.All) for access to groups APIs. These permission scopes must be consented to by an administrator (which is a change from preview). In the future we plan to add

Using authProvider with MS SDK for graph calls in C#

拥有回忆 提交于 2019-12-22 11:15:54
问题 I'm trying create a C# console application to connect to graph API and get a list of users from AzureAD from a tenant. I have registered the app and the admin has given me the following Tenant Name and Tenant ID Client ID (also sometimes called App Id) Client Secret Using the sdk the C# code I need to use looks like this (https://docs.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=cs): GraphServiceClient graphClient = new GraphServiceClient( authProvider ); var users = await

OneDrive Copy Item using Microsoft Graph SDK - GatewayTimeout at 10 seconds if ~>38mb file

你。 提交于 2019-12-22 10:47:06
问题 I am using the MS Graph .net SDK. Attempting to copy a sharepoint document library to another sharepoint document library. If the file is approximately 38mb, a GatewayTimeout exception is thrown for an unknown error. Either MS has a bug, or I am doing something incorrectly. Here is my code: HttpRequestMessage hrm = new HttpRequestMessage(HttpMethod.Post, request.RequestUrl); hrm.Content = new StringContent(JsonConvert.SerializeObject(request.RequestBody), System.Text.Encoding.UTF8,

Obtain access token for both Microsoft Graph and individual service API endpoints (Outlook REST APIs etc.)

自闭症网瘾萝莉.ら 提交于 2019-12-22 09:21:32
问题 I spent some time playing around with Azure AD OAuth 2.0. An access token obtained with scope https://outlook.office.com/mail.read throws 401 Unauthorized when used with Microsoft Graph. Similarly, an access token obtained with scope https://graph.microsoft.com/mail.read throws 401 Unauthorized when used with Outlook REST API endpoints. Also, I get an error if I mention both the scopes while authorizing a user. Is it possible to have access tokens that allow access to both Microsoft Graph and

Upload new file to onedrive using microsoft graph c# asp.net

徘徊边缘 提交于 2019-12-22 07:07:19
问题 Trying to upload a file to onedrive that does not already exist. I have managed to get it to update an existing file. But can't seem to figure out how to create a brand new file. I have done this useing the Microsoft.Graph library. Here is the code that works to update an existing file: public async Task<ActionResult> OneDriveUpload() { string token = await GetAccessToken(); if (string.IsNullOrEmpty(token)) { // If there's no token in the session, redirect to Home return Redirect("/"); }

Get Users in Group from Azure AD via Microsoft Graph

孤人 提交于 2019-12-22 05:53:52
问题 I'm requesting a list of users from AzureAD via Microsoft Graph. I get the User objects back, but their MemberOf property is always null. I thought I could use Expand to request that property specifically, and while it causes no error it also doesn't populate the property. This question and answer from mid-2016 suggests this functionality was in beta at that time, and I thought it would have graduated to the production API by now? var allUsers = await graphClient .Users .Request() .Expand(

Get Users in Group from Azure AD via Microsoft Graph

…衆ロ難τιáo~ 提交于 2019-12-22 05:53:32
问题 I'm requesting a list of users from AzureAD via Microsoft Graph. I get the User objects back, but their MemberOf property is always null. I thought I could use Expand to request that property specifically, and while it causes no error it also doesn't populate the property. This question and answer from mid-2016 suggests this functionality was in beta at that time, and I thought it would have graduated to the production API by now? var allUsers = await graphClient .Users .Request() .Expand(

Microsoft Graph scopes v2 oauth

穿精又带淫゛_ 提交于 2019-12-22 04:52:56
问题 I'm trying to build a simple Ruby application that can connect to the Microsoft Graph API and get basic information about the user, for example the manager or direct reports. I've followed a 0365-tutorial and i've got a working app that is able to get a user's mail. However when I try to then use the session tokens to query the graph api, i get an error: response.body => "{\r\n \"error\": {\r\n \"code\": \"InvalidAuthenticationToken\",\r\n \"message\": \"Access token validation failure.\",\r