msgraph-sdk-dotnet | Microsoft Graph Client Library for .NET
kandi X-RAY | msgraph-sdk-dotnet Summary
kandi X-RAY | msgraph-sdk-dotnet Summary
Microsoft Graph Client Library for .NET!
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of msgraph-sdk-dotnet
msgraph-sdk-dotnet Key Features
msgraph-sdk-dotnet Examples and Code Snippets
Community Discussions
Trending Discussions on msgraph-sdk-dotnet
QUESTION
I am using the Microsoft Graph SDK (https://github.com/microsoftgraph/msgraph-sdk-dotnet) in my .NET Core 3.1 project logged in to my Service Principal. I can retrieve the Azure Application's Web Reply URLs:
...ANSWER
Answered 2021-Nov-29 at 13:56You need to get an Microsoft.Graph.IApplicationRequestBuilder
for the specific Application
and then call UpdateAsync()
method.
QUESTION
I would like to integrate the Planner feature of Teams into a custom C++/Qt application. I'm not familiar with writing bindings C# <-> C++, so I'm exploring the possibility to use an external process that communicates with Microsoft Graph. I'm going to build this process with the C# Graph SDK.
Question: Is it possibile to avoid authentication every time I launch the process? Since I'm going to spawn this process many times (ie. each time I need to access Graph info) I want to avoid authenticating each time.
I've tried using Microsoft authentication extensions for .NET, and while the sample application seems to be working fine, I can't figure out how to connect it with the GraphServiceClient
class.
ANSWER
Answered 2021-Oct-01 at 12:39I found exactly what I need in this repo: https://github.com/Azure-Samples/ms-identity-dotnet-desktop-tutorial/tree/master/2-TokenCache
I needed to make some adjustments to compile it for .NET Core, but the code works flawlessy.
QUESTION
I am using this library (Microsoft Graph .NET client library) in my project to retrieve emails from my mailbox. However, when I try to filter messages from my mailbox by createdDateTime or body, I get a "Bad Request" error. Here are my requests:
...ANSWER
Answered 2021-Jul-29 at 14:32For filtering by createdDateTime
, you should remove ''
and use ISO 8601 format. For example: 2021-07-29T14:32:12Z
In your case, you can use ToString("s")
, please find the code as below:
QUESTION
I understand that based on the documentation here that with the C# Graph SDK library I can continue requesting the next page of results until NextPageRequest == null, but I was wondering if I could save the NextLink I get back and if I encounter an error, the next time this is executed, I could resume at the place I was at using the NextLink (using the C# SDK library).
I haven't been able to find anything in the documentation around this. Is this perhaps something I could do with the RequestBuilder?
...ANSWER
Answered 2020-Dec-16 at 19:46I figured it out, or least a way that works using the skipToken (maybe there is a nicer built in library function way of doing this).
Example query:
QUESTION
I'm currently doing a small poc on Microsoft Graph API by following the tutorial here but facing an issue where AuthorizationCodeProvider
could not be found. I've installed all the necessary packages and all. What am I missing?
ANSWER
Answered 2020-Sep-29 at 02:18According to your codes, I found you don't add Microsoft.Graph.Auth;
namespace in your codes.
I suggest you could try to add using Microsoft.Identity.Client; using Microsoft.Graph.Auth;
and test again.
QUESTION
I actually have two questions which may possibly be related:
Question 1: Why does user personal email address appear in Azure portal as User Principal Name?
Question 2: How do I look up a user by their personal email address?
The email address I will be looking for is the one used as a sign in name so I expect that it should appear in a property like signInNames
as is mentioned below.
Steps to reproduce:
Log into Azure portal, Look at a random user and observe their User Principal Name. Note it appears in the format of a personal email address (joe@somedomain.com). Copy the users Object ID.
In code, create a new GraphServiceClient
and retrive the user by object ID using the Object ID copied in the step above.
ANSWER
Answered 2020-Aug-06 at 10:42You can use this API to get information
GET https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}?$select=displayName,givenName,postalCode
QUESTION
I am trying to read a person's Out of Office text with MSGraph. I understand the only way to do this is by getting the person's mailbox settings as indicated here.
Is there another way to read a person's Out of Office Message?
Assuming there is no other way I then have read for example in this link that to call GET /users/{id|userPrincipalName}/mailboxSettings
you need to have Application Permissions for MailboxSettings.Read, MailboxSettings.ReadWrite. Is this still the case? It does not make sense to me that you need Application level permissions. Is there not a delegated (admin consent required) MailboxSettings.Read.All??? The problem is that most IT departments will be hesitant (or pigs are going to fly before some IT departments) give an application this permission to run without a signed in user.
Alternatively, I see that there is a User property of mailboxsettings, thus using the $select query parameter you can call this https://graph.microsoft.com/v1.0/users/{id}?$select=mailboxSettings
does or should this work with the User.Read.All.
UPDATE in accordance with the suggestion below I have added 2 suggestions to the MSGraph user voice.
- A person's out of office information should be included with their calendar / freebusy (getschedule) information.
- There should be a Mailboxsettings.Read.All permission.
Please click on the link and vote them up if you agree.
...ANSWER
Answered 2020-Jun-16 at 14:35No, there is no MailboxSettings.Read.All
or MailboxSettings.Read.Shared
. You can see the list at https://docs.microsoft.com/graph/permissions-reference#mail-permissions. I encourage you to request this as a feature at https://microsoftgraph.uservoice.com.
One possible approach given the currently available permissions around this API is to use app permissions and configure an app access policy to limit the mailboxes it can access - if that's the concern you're mentioning. I'm not clear on why it would be preferable to give a user account access to this info for all mailboxes in an org but not an app service principal.
It isn't included as part of User.Read.All
by design. It's not really a property on the user, it's config stored in the mailbox. It's abstracted as a property in Graph, but it requires additional permissions to access.
QUESTION
Is there way to set MaxRetry value when we use msgraph-sdk-dotnet-auth as authentication Providers. I could see it has set to 1 in AuthenticationProviderOption class
...ANSWER
Answered 2020-May-26 at 20:19You can set the MaxRetry Property maximum value of 10 (retries). By default it will be 3 if you wont set anything.
Please refer the document
QUESTION
I need to unit test Test1() as below and have to mock msgraph-sdk create event which has http call.
I was mocking Request() and AddAsync( ) methods but got null value on Act.
What is the correct way to unit test CreateAsync by mocking ?
ANSWER
Answered 2020-May-23 at 18:58There is a lot of mocking for you to test this, so maybe you should ask yourself is it worth it. If the answer is yes, then here is an example, how you can do that (I put everything into Test1
method and skipped [SetUp]
method for better visibility).
QUESTION
My application can upload files into OneDrive, SharePoint normally by Consecutive Upload. For now, It is broken, and throw InternalServerError when calling
...ANSWER
Answered 2020-Mar-10 at 14:06We also got the same issue, but it seems that it's an issue with the Graph API that (probably) changed today (2020-03-10). Someone has filed a github issue at https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/646 which you can follow, but if you really have to make this work, you can hack around it by overriding the request url using reflection.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install msgraph-sdk-dotnet
Search for Microsoft.Graph in the NuGet Library, or
Type Install-Package Microsoft.Graph into the Package Manager Console.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page