microsoft-graph-api

How to get user image in Microsoft Graph using python

最后都变了- 提交于 2020-07-10 08:56:48
问题 I tried using GET https://graph.microsoft.com/v1.0/me/photo/$value to get the user's image/photo but it only returns an HTTP 200 status code. How can I get the binary data? graph_url = 'https://graph.microsoft.com/v1.0' def get_user(token): graph_client = OAuth2Session(token=token) # Send GET to /me user = graph_client.get('{0}/me'.format(graph_url)) # Return the JSON result* return user.json() def get_image(token): graph_client = OAuth2Session(token=token) # Send GET to /me image = graph

MS Team[BETA] API for Message object property type for reaction

孤者浪人 提交于 2020-07-10 08:31:06
问题 I am trying to create the schema for Message API As per the documentation, the sample response properties for reaction provided are below Documentation sample response "reactions": [ { "reactionType": "like", "createdDateTime": "2019-01-21T19:55:51.893Z", "user": { "application": null, "device": null, "conversation": null, "user": { "id": "e1ecb745-c10f-40af-a9d4-cab946c80ac7", "displayName": null, "userIdentityType": "aadUser" } } } ] From the documentation user is Identity type identity set

How to upload to OneDrive using Microsoft Graph Api in c#

十年热恋 提交于 2020-07-10 08:25:08
问题 I have been trying to upload to a OneDrive account and I am hopelessly stuck not being able to upload neither less or greater than 4MB files. I have no issues accessing the drive at all, since I have working functions that create a folder, rename files/folders, and a delete files/folders. https://docs.microsoft.com/en-us/graph/api/driveitem-put-content?view=graph-rest-1.0&tabs=csharp This documentation on Microsoft Graph API is very friendly to HTTP code, and I believe I am able to fairly

Insufficient privileges to list group members in Graph API

半腔热情 提交于 2020-07-10 07:29:05
问题 I'm building an API which is called by a SPA (angular). The user is authenticated using Azure AD and the API uses AzureAdBearer for its authentication. I need the backend to call graph api on behalf of the user to list members of an AD Group. According to this documentation, I need one of these permissions: User.ReadBasic.All, User.Read.All, Group.Read.All, Directory.Read.All So I have added User.ReadBasic.All to my api permissions list in the app registration of my backend. I used an

Getting Unable to retrieve user's mysite URL even if the drive exists

懵懂的女人 提交于 2020-07-10 06:48:05
问题 When querying the Graph with the PHP library for a given drive I receive 400 Unable to retrieve user's mysite URL or 429 Too many requests . When I call for example https://graph.microsoft.com/v1.0/users/b0633c25-2655-4dfe-a2b2-078e4310deba/drive with the PHP library it gives this weird result. When I query the same url in the Graph Explorer. It works like a charm. I've set up the permissions as described in the docs and have the E3 Developers subscription that is still valid. What am I

Getting Unable to retrieve user's mysite URL even if the drive exists

自古美人都是妖i 提交于 2020-07-10 06:47:28
问题 When querying the Graph with the PHP library for a given drive I receive 400 Unable to retrieve user's mysite URL or 429 Too many requests . When I call for example https://graph.microsoft.com/v1.0/users/b0633c25-2655-4dfe-a2b2-078e4310deba/drive with the PHP library it gives this weird result. When I query the same url in the Graph Explorer. It works like a charm. I've set up the permissions as described in the docs and have the E3 Developers subscription that is still valid. What am I

image URL of a signed-in user using Microsoft Graph

大兔子大兔子 提交于 2020-07-09 11:51:28
问题 I've been trying to hard to get the image URL of a signed-in user using Microsoft Graph <?php $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => "https://graph.microsoft.com/beta/me/photo/$value", CURLOPT_HEADER => false, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => null, CURLOPT_MAXREDIRS => 10, CURLOPT_BINARYTRANSFER => true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML,

Receiving 400s and 500s when attempting to get singleValueExtendedProperties

帅比萌擦擦* 提交于 2020-07-09 11:48:33
问题 trying to add extended properties to calendar objects. I am able to create calendars with the following payload (Ruby syntax, payload is sent as a JSON): name: build_calendar_name, singleValueExtendedProperties: [{ id: "String {#{SecureRandom.uuid}} Name setting_id", value: @setting_id.to_s }] I receive a 201 from this request and the calendar is created no problem The frustrating part is I cannot retrieve the extended property when making a GET request. The following two requests should work

What is the difference between reply and forward in Microsoft Graph?

笑着哭i 提交于 2020-07-09 11:33:42
问题 I am using Microsoft Graph's reply and forward APIs. I am trying to understand their difference. At first, I thought the conversationId might change if I use forward. It turns out the conversationId won't change. So is there any difference between these two APIs? Thanks POST /me/messages/{id}/reply POST /me/messages/{id}/forward 回答1: One replies, one forwards. These are fundamentally different operations, even if in both cases the conversationId is preserved. Just off the top of my head:

What is the difference between reply and forward in Microsoft Graph?

夙愿已清 提交于 2020-07-09 11:33:16
问题 I am using Microsoft Graph's reply and forward APIs. I am trying to understand their difference. At first, I thought the conversationId might change if I use forward. It turns out the conversationId won't change. So is there any difference between these two APIs? Thanks POST /me/messages/{id}/reply POST /me/messages/{id}/forward 回答1: One replies, one forwards. These are fundamentally different operations, even if in both cases the conversationId is preserved. Just off the top of my head: