office365-apps

The client application has requested access to resource 'https://outlook.office365.com'. This request has failed

倖福魔咒の 提交于 2019-12-06 19:54:55
问题 I am trying to test the sample code from office365 API, I could login to my account but after that i would always get this exception AuthenticationFailedException was caught AADSTS65005: The client application has requested access to resource 'https://outlook.office365.com'. This request has failed because the client has not specified this resource in its requiredResourceAccess list. Trace ID: 7a39b0bd-1738-418f-984a-feffae5b5d9b Correlation ID: 16da7c7f-9f0c-468f-a560-a51b1ac9b3bf Timestamp:

Office365 authentication without login redirection

落爺英雄遲暮 提交于 2019-12-06 00:05:59
I'm trying to load data from Office365 email without need for user interaction. I've created Azure App and I have Client ID and Client secret. I also have user information (email + password). I need to call Office365 API to download emails from mailbox. But I need application to download them in background without user interaction (redirecting to MS/Office365 login page) to get authenticated/logged into mailbox. Is there any way how to do this only through Office API, without need of redirection? Thanks for any info. Yes, you are able to create a daemon service app using the Client Credential

Outlook API OAuth2 offline acces / permanent access using php

荒凉一梦 提交于 2019-12-05 09:37:20
I followed the tutorial below to get mail using outlook api. This works, but requires the user to login every time to give access. Is there a way to give permanent / offline access? Similar to how gmail api works (access to when your not at your keyboard) https://dev.outlook.com/RestGettingStarted/Tutorial/php Absolutely! In order to get offline access, you need to add the offline_access scope to your requested scopes. This will result in a refresh token being sent along with your access token. You can use the refresh token to get a new access token when the current one expires. See the

The client application has requested access to resource 'https://outlook.office365.com'. This request has failed

£可爱£侵袭症+ 提交于 2019-12-05 01:41:34
I am trying to test the sample code from office365 API, I could login to my account but after that i would always get this exception AuthenticationFailedException was caught AADSTS65005: The client application has requested access to resource ' https://outlook.office365.com '. This request has failed because the client has not specified this resource in its requiredResourceAccess list. Trace ID: 7a39b0bd-1738-418f-984a-feffae5b5d9b Correlation ID: 16da7c7f-9f0c-468f-a560-a51b1ac9b3bf Timestamp: 2014-07-09 07:36:34Z This is the code that I have been testing this code is generated by the API.

Microsoft Graph API mail office 365: Is any option create inbox message NOT as Draft?

半世苍凉 提交于 2019-12-04 19:47:01
I'm using office 365 mail Microsoft Graph API , trying to create new message following the Doc: https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/user_post_messages POST https://graph.microsoft.com/beta/me/messages Content-type: application/json { "subject":"Did you see last night's game?", "importance":"Low", "body":{ "contentType":"HTML", "content":"They were <b>awesome</b>!" }, "toRecipients":[ { "emailAddress":{ "address":"AdeleV@contoso.onmicrosoft.com" } } ] } { OUTPUT: "@odata.context":"https://graph.microsoft.com/beta/$metadata#users('ad787b4f-1fda-4523-8e48

Failed to acquire token silently. Call method AcquireToken

六眼飞鱼酱① 提交于 2019-12-04 16:49:36
I am trying to get some calendar items from outlooo 365 API The code I got from the sample is this: public async Task<ActionResult> Index() { // fetch from stuff user claims var signInUserId = ClaimsPrincipal.Current.FindFirst(ClaimTypes.NameIdentifier).Value; var userObjectId = ClaimsPrincipal.Current.FindFirst(SettingsHelper.ClaimTypeObjectIdentifier).Value; // discover contact endpoint var clientCredential = new ClientCredential(SettingsHelper.ClientId, SettingsHelper.ClientSecret); var userIdentifier = new UserIdentifier(userObjectId, UserIdentifierType.UniqueId); // create auth context

Add-ins do not show up under 'Admin Managed' after deploying them to the Office 365 Admin Centre

时光毁灭记忆、已成空白 提交于 2019-12-04 10:22:05
After deploying a Word Add-in via centralised deployment, it doesn't show up in Word. We used this procedure to deploy the add-in and it lists it there succesfully. Because we were worried it may be due to something wonky with our own plugin, we then decided to try to deploy the 'Contoso Citations' plugin which is used in the same procedure and screenshots here . After capturing traffic whenever we press 'Update' under the Add-in Admin Managed dialog, we noticed a connection to Exchange. We then captured the traffic using a proxy and some root certificates, and we found the following call:

Difference between notebook id by OfficeJS and OneNote API

走远了吗. 提交于 2019-12-02 06:40:42
问题 I'm trying to build task-pane add-in for OneNote ClassNotebook. I want to know whether current user is teacher or student. To achieve this, my plan was: 1. Get ID of activeNotebook from officeJS 2. Get class notebooks with ID from 1 from OneNote API 3. Use students and teachers from 2 to check if current user is student or teacher But the id from 2 is something weird form like this - {3b9c6337-cd8c-5c1c-a87b-1a9515237c48}{1} How can I fetch notebook with that ID? Code: let notebook = ctx

Change word document style with an app for Office

好久不见. 提交于 2019-12-02 02:33:49
Im trying to create an app for Word Office using the Office js API. I have found how to get and set content into the word document but Im having a hard time finding how to change things like Styles (Headings, etc.) Before getting into how to do it, is it even possible? The answer to you question is yes and now, the word api is a bit new and missing some functionalities which may make a developer life easier. First, headers are not supported in the word api, a work around for this is to create a Content control and use it as a header. I am currently using this work around in a word app that I

Yammer REST API: 401 Unauthorized when using Azure AD token and Yammer Delegated Permissions

。_饼干妹妹 提交于 2019-11-30 10:32:41
I am creating an Azure AD App that is using the new Yammer delegated permissions preview to post a message to Yammer using the access token that I obtained from Azure AD. Unfortunately, I get a 401 Unauthorized response when trying to call Yammer Rest APIs. Here is the code sample: var resourceId = "https://www.yammer.com"; var endpointUrl = "https://www.yammer.com/api/v1/messages/following.json"; AuthenticationHelper helper = new AuthenticationHelper(); helper.EnsureAuthenticationContext(AuthenticationHelper.AuthorityMultitenant, resourceId); var token = helper.AuthenticationResult