microsoft-graph-api

Accessing and creating Teams Chats via Graph API

守給你的承諾、 提交于 2021-01-28 14:19:38
问题 I'm going over the Microsoft Teams section of the Graph API and trying to find out how to do two things: Create a new chat, giving it a topic that correlates to an entity in our app (essentially creating a chat around an entity), invite specific users into it, and send messages to the chat. Access the currently logged-in user's private chats, filtered by their topic , and show their contents inside our app. For #2, it looks like it should be possible using beta endpoint of the Graph API, but

Get calendar schedules with Graph API from C# service

两盒软妹~` 提交于 2021-01-28 12:01:44
问题 I need to use the Microsoft Graph API to get free/busy schedules from the calendar with a .NET Core Windows service. According to Microsoft's own documentation I should use the following: GraphServiceClient graphClient = new GraphServiceClient( authProvider ); var schedules = new List<String>() { "adelev@contoso.onmicrosoft.com", "meganb@contoso.onmicrosoft.com" }; var startTime = new DateTimeTimeZone { DateTime = "2019-03-15T09:00:00", TimeZone = "Pacific Standard Time" }; var endTime = new

Python requests library is not working, while cURL is working

北战南征 提交于 2021-01-28 08:06:43
问题 I need to retrieve a JWT (JSON Web Token) from a Microsoft API using Python (check this API documentation for Microsoft Graph) The following Python code using the requests library does not work giving HTTP response code 400, however, the equivalent cURL command does work giving back the expected JSON containing the JWT. Python / requests code: tenant = "<MY_FOO_TENANT>" token_url = "https://login.microsoftonline.com/{}/oauth2/v2.0/token".format(tenant) http_headers = { 'Content-Type':

Why are we suddenly getting 403 on graph calls to list a team's channels?

♀尐吖头ヾ 提交于 2021-01-28 07:40:33
问题 We do run the GET call: https://graph.microsoft.com/v1.0/teams/711fc163-0408-4649-9a30-af65a5d30b52/channels It used to return the channels just fine, but this week it suddenly starting failing with this error: { "error": { "code": "AccessDenied", "message": "Failed to execute Skype backend request GetThreadsS2SRequest.", "innerError": { "request-id": "226d8e17-fa0f-4c42-8139-4776e198a3b2", "date": "2019-08-26T19:25:10" } } } We see that the problem is happening for different teams and across

Microsoft Teams Graph API - Invalid bind property name owners in request

一世执手 提交于 2021-01-28 06:58:08
问题 I'm currently having major issues with creating teams from the Graph API. I was initially trying to create teams based on groups, however I have found out today that you can now create a team without creating a group first then waiting 15 minutes to then create the team from the following link. This would make things considerably simpler. https://docs.microsoft.com/en-us/graph/api/team-post?view=graph-rest-1.0 I am using the Microsoft.Graph SDK (v3.12.0 released 26th Aug) so replicated the

Graph API - adding Schema Extension using .Net Core 3.1

巧了我就是萌 提交于 2021-01-28 05:25:50
问题 I need to add custom claims to my Azure B2C users, so I figured the way to do this is to add schema extensions to the User for my directory App with Graph API (beta). I wrote a simple test for that: SchemaExtension schemaExtension = new SchemaExtension { Id = schemaName, Owner = _appClientId.ToString(), Description = string.IsNullOrWhiteSpace(schemaDesc) ? string.Empty : schemaDesc.Trim(), TargetTypes = new List<string> { "User" }, Properties = new List<ExtensionSchemaProperty> { new

How to fix MS Graph message body search?

旧巷老猫 提交于 2021-01-28 05:09:14
问题 Using graph explorer to execute the following message search by subject works as expected: https://graph.microsoft.com/v1.0/me/messages?$search=%22subject%3Agoogle.com%3A443%2Fsearch%3Fq%3Da%2Btest*%22 However, this message search by body fails. The only difference between this and the previous search is that subject is replaced with body: https://graph.microsoft.com/v1.0/me/messages?$search=%22body%3Agoogle.com%3A443%2Fsearch%3Fq%3Da%2Btest*%22 The error that I receive for the second search

Uploading Profile Photo from Microsoft Graph Explorer

两盒软妹~` 提交于 2021-01-28 05:07:50
问题 I cannot upload a photo from Microsoft Graph Explorer. I am getting this error: An internal server error occurred. The operation failed., The file you chose isn't an image. I have image/jpeg as content-type and a valid binary data extracted from Fiddler. Authorization token is also there when I inspect my request from Fiddler. What did I missed? Request body: https://pastebin.com/YDUfpRmX Response: https://pastebin.com/e6fzDYvi PUT https://graph.microsoft.com/beta/users/[userprincipalName]

download attachments from mail using microsoft graph rest api

浪尽此生 提交于 2021-01-28 03:48:24
问题 I've been successfully getting the list of mails in inbox using microsoft graph rest api but i'm having tough time to understand documentation on how to download attachments from mail. For example : This question stackoverflow answer speaks about what i intend to achieve but i don't understand what is message_id in the endpoint mentioned : https://outlook.office.com/api/v2.0/me/messages/{message_id}/attachments UPDATE i was able to get the details of attachment using following endpoint :

Are the organizer and isOrganizer Attributes in MS-Graph event working?

眉间皱痕 提交于 2021-01-28 02:06:16
问题 I'm trying to use the MS Graph API to create a new event with a technical user on behalf of a resource. The event is created, but the organizer and isOrganizer Attributes are not considered or ignored in the response. I tried multiple requests as well as in 'v1.0' and 'beta' mode. In this SO question How to create event where current user not organizer using Microsoft Graph API it is stated that this is not implemented at the time of the original post (2016). But I didn't find anything in the