office365-restapi

Getting the email id from the Outlook REST API when sending email

≯℡__Kan透↙ 提交于 2019-12-11 06:54:05
问题 I am trying to use the Microsoft Rest API to send emails on behalf of our users. When I create a message as a draft, I get back an ID that I can use in future requests for editing, deleting, viewing the full conversation (after it is sent), etc. I do not want to save it as a draft since I have no reason to, I just want to send it directly. After it is sent, I would still like to view the full conversation. However, if I just send the email (using the /sendmail endpoint), I do not get that ID.

Are app-only tokens already available for Microsoft Graph API webhooks?

梦想与她 提交于 2019-12-11 06:16:48
问题 I'm trying to retrieve information via a webhook, regarding User's OneDrives on a Tenant, using an app-only token, and the Microsoft Graph API. The problem I'm having is that the Microsoft Graph Explorer keeps returning me an undefined error in an 500 response, that gives me little information, when creating a new subscription : { "error": { "code": "", "message": "An error has occurred.", "innerError": { "request-id": "16546770-c3b0-4d9f-8a9c-1a79fb17ffcd", "date": "2016-09-06T10:15:04" } }

Writing a simple microsoft graph client without using a web server

徘徊边缘 提交于 2019-12-11 01:58:28
问题 I'm looking to write a script to update a Distribution List in Office365. I'm in the process of learning the MS Graph API and have gotten the python REST sample to work. It appears that all the sample Graph API code, regardless of language or platform, has an assumption that I'm coding from a web user interface in one way or another. Is it possible to write a simple client that runs from a Linux box and allows me to specify my Office 365 id in my code, without having to select it from a

Write efficient queries with the OutlookServicesClient

末鹿安然 提交于 2019-12-08 07:29:25
问题 I am using the Office 365 Mail API and my goal is to get the total number of email messages a user sent (1.) and received (2.) today . Todo this, I first created and tried and run some queries in the Office 365 API Playground: https://outlook.office.com/api/v2.0/me/mailfolders/sentitems/messages?$filter=sentdatetime%20ge%202015-12-10T08:00:00.000Z&$select=Subject,CreatedDateTime,ToRecipients https://outlook.office.com/api/v2.0/me/messages?$count=true&$filter=receiveddatetime%20ge%202015-12

Use multiple scopes with the Office 365 API

耗尽温柔 提交于 2019-12-08 06:11:28
问题 I want to use the two scopes https://outlook.office.com/Mail.Read and https://outlook.office.com/calendars.read to read an authenticated users' email and calendar. I followed the official .Net (WPF) tutorial to authenticate the user and obtain a token. It works well as long as my scope is only one of the ones above. As soon as I use both, I don't get back a token when I try to obtain it. That's basically what I do: private static string[] scopes = { "https://outlook.office.com/Mail.Read",

Any Office 365 REST API to get messages from all mailboxes in an organization?

依然范特西╮ 提交于 2019-12-07 07:07:12
问题 I am exploring an option to see if it's possible to get messages from all mailboxes in an organization (i.e within a domain) using Office 365 Mail REST APIs or if there is any other way to easily get these messages. These are the options I have explored: 1) bcc all emails to a particular account and then get messages from bcc account. 2) Explored the connector option to send all mails to another email server. 3) I also saw in other posts which advises to create an Admin account/security group

Office 365 v2 API Authorization code is malformed or invalid

爱⌒轻易说出口 提交于 2019-12-06 13:49:02
问题 I've the following auth code copied from the browser for a user who granted our app to use their Office 365 email. code=OAQABAAIAAADRNYRQ3dhRSrm-4K-adpCJ3J3UJ8GyC2qJDvNhlrUAObjph6sQ3A9waeQ5Tr-DA6WzxCdFbvadCRJw2S4a_lwA7MyelZWAPQZOlaB_X_1165CbmTXJMGioU6Cr0DhVTUzIlUv_-Svjp8DBrLVCxcDp5rJMM5mDNR0iGysuDIozWnOaPqCOl35NxPzyktrYK6D1MBptmXOPbhS-stTZXbHJr9gGE3FHzMU0XANXmTm30q4SPaoWPch-S1uFFL4xwS2oUv-lELBdcfIGh5UJBSraabGihVWUnbwBhh8eURSMRwryi7kubUcq0D27S

Fetch messages filtered by conversationId via Office365 API

Deadly 提交于 2019-12-06 12:38:53
问题 I'm having some trouble figuring out how to use the office365 api to fetch messages given a conversationId . Let's say my conversationId is AAQkADlkOGJmMTFmLTc2NjMtMKL3My04ZDhkLTVmZWNjMzA1ODY0NAAQAB11Xh2opSpBiXifMEJjhow= I'll make a request like https://outlook.office.com/api/v1.0/me/Messages?$filter=ConversationId%20eq%20AAQkADlkOGJmMTFmLTc2NjMtMKL3My04ZDhkLTVmZWNjMzA1ODY0NAAQAB11Xh2opSpBiXifMEJjhow= This results in a 400 response like this: { "error": { "code": "RequestBroker-ParseUri",

What to do if app misses notification - SequenceNumber jumps over by one or more?

只愿长相守 提交于 2019-12-06 05:15:43
Where I am right now? I have subscribed to calendar notifications via office365's REST API. When any event in that calendar are created/updated/deleted office365 sends notification to my app's endpoint which I assigned when I created this subscription. Subscription code works like a charm and notifications are coming immediately. I really want to make my code error tolerant and here comes the problem: what happens if notifications are coming in non-incremental order? For example if someone first creates event and then removes it. Can those notifications come in opposite order? 1. remove event,

Any Office 365 REST API to get messages from all mailboxes in an organization?

荒凉一梦 提交于 2019-12-05 16:27:56
I am exploring an option to see if it's possible to get messages from all mailboxes in an organization (i.e within a domain) using Office 365 Mail REST APIs or if there is any other way to easily get these messages. These are the options I have explored: 1) bcc all emails to a particular account and then get messages from bcc account. 2) Explored the connector option to send all mails to another email server. 3) I also saw in other posts which advises to create an Admin account/security group and give that account the full access to all mailboxes in an org using power shell but this option