Questions tagged [graphserviceclient]

31 questions
4
votes
2 answers

How to apply an equality filter to a Users request?

I'm trying to make a call to the MS Graph Users API using C# and the GraphServiceClient. I'm trying to filter by Mail but no matter what format I try, it gets rejected due to an invalid query. I've tried all the examples I've found on the interwebs…
ChiefTwoPencils
  • 13,548
  • 8
  • 49
  • 75
3
votes
0 answers

Why did azure graph service client start to throw different exceptions?

I am using azure graph service client to add/update users and groups in Office365. I relied on its exceptions which were of type ServiceException and contained status code and message, which I used to determine what to do next with this result. It…
Isard
  • 312
  • 1
  • 14
2
votes
0 answers

How to refresh token for GraphServiceClient

I have the following code: builder.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme) .AddMicrosoftIdentityWebApp(config.GetSection("AzureAd")) .EnableTokenAcquisitionToCallDownstreamApi(initialScopes) …
Oleg Sh
  • 8,496
  • 17
  • 89
  • 159
2
votes
1 answer

Authorisation Exception using GraphServiceClient with Client Secret in Azure

I'm developping a tool (Windows Forms) to automate certain processes. I need to read the members of specific AD group and create an event in each members calendar. For this I use the GraphServiceClient in a C# application. I've added an "App…
Berrepoot
  • 141
  • 10
2
votes
3 answers

How to create GraphServiceClient?

I'm developing Windows form app using Microsoft Graph API. Does anyone know how to get an access token and how to create GraphServiceClient?
Goga
  • 53
  • 2
  • 8
1
vote
0 answers

What is the Microsoft GraphServiceClient v5 Replacement for AppendSegmentToUrl

While investigating an upgrade of my C# use of Microsoft GraphServiceClient v4 to v5 I was looking at the usage I have of the chats: getallMessages for which I need to be able to append the "model" query string parameter this format: GET /users/{id…
1
vote
1 answer

GraphServiceClient PageItarator failes with 'The Parsable does not contain a collection property'

I wanted to use the PageIterator in my project, and it works perfectly until I wanted to take out group members from AzureAD. No matter what I do, the PageIterator failes with 'The Parsable does not contain a collection property'. List users =…
1
vote
1 answer

Request for retrieving email message and expanding attachments doesn't retrieve referenceattachments

retrieving email message expanding attachments doesn't retrieve referenceattachments (that we upload using upload & share from onedrive) If an email contains only reference attachments the list would return empty GET /users/{id |…
1
vote
0 answers

Get delivery status from GraphServiceClient

I have working code (See below) that successfully sends email. But I would like to add the ability to update status if there was an issue with the delivery (partner email error, such as "no such email address here"). Is that possible? I've seen that…
1
vote
0 answers

Issue while using AWAIT with GraphserviceClient in VB.NET

I am implementing Office 365 modern authentication using MSGraph in old application. When I try to access emails using graphserviceclient object asynchronously in console VB.net application it stops execution without giving error. Same code works…
1
vote
0 answers

GraphServiceClient equivalent for WellKnownFolderName.MsgFolderRoot

I'm redesigning a tool that uses EWS (Exchange Webservice). All functionalitiets should be available in the GraphServiceClient but there is 1 small piece of code I can't figure out: ExchangeService service = new…
Berrepoot
  • 141
  • 10
1
vote
2 answers

Files created from app using Graph API always shown as created by "Sharepoint App"

My app is creating a file (DriveItem) using Graph API. It's using GraphServiceClient from Microsoft.Graph nuget and gets access token with ClientSecretCredential. Here's the part when the file gets created: public async Task CreateFile(string…
1
vote
0 answers

Await vs .GetAwaiter.GetResult() - .Net GraphServiceClient

I have an async function that pulls emails from Office365. The application will send emails with no difficulty using the graphServiceClient but when I ask for the inbox contents I end up with a blocking line when I await (ie the following line of…
Rich Freeman
  • 1,009
  • 2
  • 9
  • 22
1
vote
1 answer

Filter group members by displayName does not work

I need to provide an endpoint which allows users to search for members within a group the below code works fine when no filter is passed in (it returns members of the group), but when passing in a queryString I get this…
Bassie
  • 9,529
  • 8
  • 68
  • 159
1
vote
1 answer

MsalUiRequiredException: No account or login hint was passed to the AcquireTokenSilent call

I am developing Windows form application using Graph API. I created a function that returns a GraphServiceClient and a function that returns signed-in user. When I launch the application, an error appears- MsalUiRequiredException: No account or…
Goga
  • 53
  • 2
  • 8
1
2 3