microsoft-graph

Connect to Microsoft Graph from MVC on behalf of logged in user

限于喜欢 提交于 2020-01-05 04:18:12
问题 I have created an MVC web app, that has certain pages that require a user to be logged in. The app is multitenant, and the authentication is configured in the Startup.Auth.cs. The ConfigureAuth file looks like this: public void ConfigureAuth(IAppBuilder app){ app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType); app.UseCookieAuthentication(new CookieAuthenticationOptions()); app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions {

Expanding and Filtering MS Graph API Does Not Work

随声附和 提交于 2020-01-05 04:10:07
问题 I need to get an eventMessage from a user's mailbox that is associated with a specific event . I have the event's iCalUId but I am unable to filter on it: /users/${roomEmailAddress}/messages ?$expand=microsoft.graph.eventMessage/event($filter=iCalUId eq '${iCalUId}') What I am trying to do is get all messages, then expand so that I see the events associated with each message, then filter each event to find the one I care about. However, I get a response with all events and the filtering

How to use OAuth when there is no user delegation? — Microsoft Graph API

走远了吗. 提交于 2020-01-05 03:40:12
问题 I am trying to use the Microsoft Graph API to get some information about users in a particular group in Azure AD. I need to get the data as part of an ETL task of a data warehouse. When pulling data from other cloud applications, I have gotten an API key and placed the key in the Authorization header. OAuth is new to me (except having experienced it as a user) and I feel like I understand the concept but I am sure there are things that I am not grasping properly. Problem: I get a 401 error on

Graph API denies access even though I granted access

风格不统一 提交于 2020-01-04 19:41:33
问题 I followed the ASP.NET Quick Start guide and got the project working. The API succeeds in retrieving my email address just fine - great. Now I want to get a list of users and retrieve some of their properties. In GraphService : public async Task GetUsers(GraphServiceClient graphClient) { var users = await graphClient.Users.Request().Select("mail").GetAsync(); } Which I call with (copying the method to retrieve user email): var graphClient = SDKHelper.GetAuthenticatedClient(); await

Inviting a User in Azure AD through Microsoft Graph API doesn't work

放肆的年华 提交于 2020-01-04 18:20:32
问题 Below is the code that I have put to invite a user in Azure AD. I get an "unauthorized" response. I am not sure what permission/setting are missing. Do anyone have the idea. string accessToken = await AuthenticationHelper.GetTokenForApplication (); InvitationModel invite = new InvitationModel (); invite.invitedUserEmailAddress = user.Email; invite.inviteRedirectUrl = ConfigurationManager.AppSettings["InviteRedirectUrl"]; invite.sendInvitationMessage = true; using (HttpClient client = new

In Outlook Graph API, the message ID appears to change after calling send on a draft

本小妞迷上赌 提交于 2020-01-04 12:50:26
问题 I'm working on an integration with Outlook365 that needs to track the email replies sent through the app, as to make it possible to open the email with Outlook online. Because /sendMail returns an empty response, reading the documentation I noticed that it's possible to create a draft reply to an existing message with: POST /v1.0/me/messages/{previous message ID}/createReply This returns a message representing a reply, that already has a message ID allocated. After updating the message with

Microsoft Graph api 403 access denied when reading other users

时间秒杀一切 提交于 2020-01-04 09:04:52
问题 I'm creating an application in with angular and nodejs and I need to be able to read another user's list of events. Right now I am attempting to use "https://graph.microsoft.com/v1.0/users/otherusername@companyurl.com/events" this gives me the 403 "Access is denied. Check credentials and try again.". However, if I use "https://graph.microsoft.com/v1.0/users/myusername@companyurl.com/events" it works(as most would expect). My question is, why is it when I use outlook I can use scheduling

Access Denied when querying Teams in Microsoft Graph

不羁岁月 提交于 2020-01-04 06:15:28
问题 Whenever I query the Teams endpoint in Microsoft Graph: GET https://graph.microsoft.com/beta/teams/{id} I get the following error: AccessDenied - Failed to execute Skype backend request GetThreadRequest. The permissions are set according to the documentation. (Group.Read.All - delegated permission) Querying https://graph.microsoft.com/beta/groups/{id} is working while with the same access token https://graph.microsoft.com/beta/teams/{id} isn't. I tried it with my own application and in the

Microsoft Graph Subscriptions - Exchange Online resources are not supported for MSA requests

吃可爱长大的小学妹 提交于 2020-01-04 05:38:33
问题 I think I have sort of the same problem as Microsoft Graph Subscriptions - Method not Allowed and the question is answered and there is this comment Microsoft Graph Subscriptions - Method not Allowed Request https://graph.microsoft.com/v1.0/subscriptions { "changeType": "created,updated,deleted", "notificationUrl":"https://c5e719ba.ngrok.io/api/ms/watch", "resource": "me/events", "expirationDateTime":"2016-12-07T02:23:45.9356913Z", } Response Header Cache-Control: private Transfer-Encoding:

sendMail Function seem not working with Microsoft graph

早过忘川 提交于 2020-01-04 05:28:05
问题 from https://github.com/microsoftgraph/nodejs-connect-rest-sample i can signin through the first step and i see my microsoft account name already but when i click to send a test email it's not working it respond me this After I clone this example from github i just modify a bit of code (Insert My APIKEY and clientID at /utils/config.js ) module.exports = { creds: { redirectUrl: 'http://localhost:3000/token', clientID: 'd5cec81e-13b3-XXXX-b90f-de0b123feaa4', clientSecret: