microsoft-graph-api

MS graph InvalidDeltaToken on events list next page

£可爱£侵袭症+ 提交于 2021-01-29 10:31:23
问题 I'm getting an error when I call NextLink from the response of first delta. Any ideas why it's happens? first call: https://graph.microsoft.com/beta/users/4ca91597-4091-4cce-856b-7472b3f9ade1/calendars/AAMkAGM3MDdhNGZlLWRjYTUtNGZkYS04NTcxLTU2OTNkZWEwNDlhYQBGAAAAAAAmh2PA4MC8QpGOM1iWfgeZBwCI_1RC5zxoQrQX6X2piZBLAAAAAAEGAACI_1RC5zxoQrQX6X2piZBLAAAAjD53AAA=/events/delta response: { "@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(event)", "@odata.nextLink": "https://graph

Include AAD group name in the JWT token

妖精的绣舞 提交于 2021-01-29 10:02:21
问题 Is there an option to include the AAD group name (display name) instead of the Object Id in the JWT token issued by AAD? If yes - how? … "family_name": "Smith", "given_name": "John", "groups": [ "0e1cbc5f-94bc-4c3b-a22b-a4c56bbdbd7d", // <- replace id with name "9762d7ea-c0a9-4543-8a3e-2459e826a35a" ], … Some background: I’m implementing OAuth with AAD for an API. I configured 2 Service Principals (1 for API, 1 for client) and added delegated & application permissions. I also configured

Microsoft Graph - Authorization Flow - Get Authorization Code from Console App

那年仲夏 提交于 2021-01-29 09:18:46
问题 I have an Azure AD registered App and a AD user. I would like to use authorization flow in my c# console app to first get the authorization code as mentioned in this article https://docs.microsoft.com/en-us/graph/auth-v2-user and then exchange that auth code to get an access token. I would eventually like to store the access token and refresh token and use it for offline scenarios. I created a Httpclient and did a post request to get the authorization code but the Microsoft Consent screen

Microsoft Graph, adding multiple attachments to an email

↘锁芯ラ 提交于 2021-01-29 08:26:35
问题 I am using .netCore and Microsoft Graph and trying to add multiple attachments to an email and send it. The email sends nicely, all is there (if i send 2 attachments you see that there are 2 attachments), however only the first attachment is able to be opened up by the recipient. (the attachments all together are less than the 4MB max, so that is not the issue). The code is string content = "{\"message\":{" + "\"subject\":\"" + email.Subject + "\"," + "\"body\":{" + "\"contentType\": \"HTML\"

Using Microsoft.Graph to get current application permissions

混江龙づ霸主 提交于 2021-01-29 08:05:34
问题 My C# program uses the Microsoft.Graph Nuget. And it needs be able to ensure that it has the correct Microsoft Graph application permissions. I know how to add permissions in AD, but I want my program to be able test it has the permissions it needs. Example of what I want to achieve : var graphClient = new GraphServiceClient(authenticationProvider); if(!graphClient.GetPermissions().Contains("AdministrativeUnit.Read.All")) { throw new Exception("Missing Permission AdministrativeUnit.Read.All")

“The tenant for tenant guid does not exist” when using GraphAPI - Even with user type as Member

好久不见. 提交于 2021-01-29 07:12:43
问题 I am trying to access email using Microsoft Graph API. When I try to access the email I got the below error. Microsoft.Graph.ServiceException: 'Code: OrganizationFromTenantGuidNotFound Message: The tenant for tenant guid '<some id>' does not exist. Here is the code to get the emails var graphServiceClient = new GraphServiceClient(new DelegateAuthenticationProvider((requestMessage) => { requestMessage.Headers.Authorization = new AuthenticationHeaderValue("bearer", accessToken); return Task

How can I access a mailbox with restricted permissions through EWS without interactive login?

淺唱寂寞╮ 提交于 2021-01-29 06:47:26
问题 We need to read out distribution lists from a contact folder of a dedicated exchange/outlook mailbox (O365). The process must run as a service with no user interaction. Unfortunately the Graph API does not support distribution lists (not even the Graph beta version does). Because of this we have to use another API - I tried using EWS. I succeeded by granting full_access_as_app permission to our service. However this allows to read and modify ANY data in ANY mailbox which is a security risk.

Word add-in Error Code 13004

倾然丶 夕夏残阳落幕 提交于 2021-01-29 06:19:59
问题 Just want to ask for help in this error, seems like there is little documentation about this error. I created a Word add-in that utilizes MS Graph, when I deployed it through Azure App Service and run the add-in in Word. It throws this error: Error code: 13004 Name: Invalid application resource Url provided. Message: Invalid resource Url specified in the manifest. Do note that I am using Azure's default app service URL for my add-in, which is something like https://yourappname.azurewebsite

How to retrieve shared notebooks using the MS Graph API (beta endpoint)

你说的曾经没有我的故事 提交于 2021-01-29 03:14:22
问题 According to OneNote in the Microsoft Graph API (in Preview) it should be possible to retrieve and access notebooks owned by the user and shared by other users (plus O365 group notebooks). However, executing https://graph.microsoft.com/beta/me/notes/notebooks just returns my (owned) notebooks (not the shared ones). So maybe I'm doing something wrong here, but how do I list all notebooks that my user has access to (owned as well as shared) using the Graph API? 回答1: Sorry for the confusion,

Sending email using ClientCredentialProvider is failing to find tenant guid

怎甘沉沦 提交于 2021-01-28 19:01:44
问题 I am using Microsoft Identity's OAuth 2.0 support to send email using Microsoft Graph. Created a personal email account as XXXX@outlook.com. Using this account I login to Azure AD and create a tenant there. Used ClientCredentialProvider (From msgraph-sdk-auth-java) as authorizer trying to send an email to myself. Steps: Created a Tenant account. Created an application and given permission in Graph>Application->Send.email etc Created a Secret key Below is the error I am getting: POST microsoft