Questions tagged [microsoft-graph-api]

Microsoft Graph is the gateway to data and intelligence in Microsoft 365. It provides a unified programmability model that you can use to access the tremendous amount of data in Microsoft 365, Windows 10, and Enterprise Mobility + Security.

Microsoft Graph exposes REST APIs and client libraries to access data on the following Microsoft cloud services:

  • Microsoft 365 services: Delve, Excel, Microsoft Bookings, Microsoft Teams, OneDrive, OneNote, Outlook/Exchange, Planner, SharePoint, Workplace Analytics.
  • Enterprise Mobility and Security services: Advanced Threat Analytics, Advanced Threat Protection, Azure Active Directory, Identity Manager, and Intune.
  • Windows 10 services: activities, devices, notifications, Universal Print (preview).
  • Dynamics 365 Business Central.
13005 questions
12
votes
3 answers

How to convert the string type from an API response to an image file - ����\u0000\u0010JFIF\u0000\u0001\u0001\u0000\u0000\u0001 -

I have used https://graph.microsoft.com/beta/me/photo/$value API to get the profile picture of the outlook user. I get an image on running the above API in the rest-client. The content-type of the API is "image/jpg" But, in Node.js, the response of…
Dinesh Madanlal
  • 337
  • 4
  • 20
12
votes
3 answers

microsoft graph API using filter on get sharepoint items

i am trying to filter my Sharepoint Items results query with the Microsoft Graph API as explained here so i am trying this https://graph.microsoft.com/beta/sites/{site-id}/lists/{list-id}/items so i tried adding ?&filter=od eq 1, or copying from…
bresleveloper
  • 5,940
  • 3
  • 33
  • 47
12
votes
1 answer

Get Extended Properties on User using Microsoft Graph

I am working with Microsoft Graph to manage Azure AD users and am having some trouble accessing extension properties on a User object. The property was added when the user was created using Azure AD Graph API and if you query the user using Azure AD…
J Lauzon
  • 141
  • 1
  • 2
  • 6
12
votes
1 answer

MS Graph API C# Add user to group

I've been investigating how to add (and later remove) a user from an Azure AD group using the Microsoft Graph API (the dotnet/C# library available on nuget). Nuget MS Graph API Ignoring all else around getting a connected GraphServiceClient etc. I'm…
peteski
  • 1,455
  • 3
  • 18
  • 40
12
votes
2 answers

Microsoft.Graph send mail with attachment

using Microsoft.Graph IMessageAttachmentsCollectionPage Message.Attachments I can not seem to get this to take any "ContentBytes" which is in the FileAttachment.ContentBytes. My sample is from Microsoft…
twc
  • 449
  • 1
  • 3
  • 12
12
votes
1 answer

How to get admin access to files for all user's OneDrive

I am tenant admin for our Office 365 deployment. we have our internal system which need to access all OneDrive sites. We are using my tenant admin credential to get the OAuth token and trying to get files from all OneDrive sites using…
user2768967
  • 367
  • 1
  • 4
  • 18
11
votes
4 answers

Microsoft.Graph GetAsync() hangs indefinitely

Introduction I am developing an ASP.NET application which, among other things, is supposed to retrieve users from Azure Active Directory. For this purpose, I am using the Microsoft Graph version 1.14.0 preview library, which can be found here. As…
Johan Wintgens
  • 529
  • 7
  • 15
11
votes
1 answer

How to upload files to onedrive using msgraph-sdk-python?

I'm not a newbie when it comes to python (nor a professional), but this is the first time I'm trying something like this. I would like to upload files to OneDrive using an python script. Sounds simple right? Well apparently it's more then I can…
11
votes
2 answers

What is the difference between the filter and search query parameters in Microsoft Graph Mail API?

While I was looking at the documentation for query parameters here, I noticed that there were two query parameters that seemingly did the exact same thing: filter and search. I'm just wondering what the difference is between them and when is one…
Stefan Aleksić
  • 313
  • 2
  • 12
11
votes
2 answers

Create Microsoft Graph GraphServiceClient with user/password unattended

I am creating a console application that connects to Microsoft Graph using the Microsoft Graph API (as shown in https://github.com/microsoftgraph/console-csharp-connect-sample). Everything is working fine, but I wonder if there is a way where I can…
Ada
  • 261
  • 1
  • 3
  • 14
11
votes
6 answers

Microsoft Azure AD graph API: How do I retrieve a user's email address?

I am able to get access to a user's accessToken, and am making a call to GET https://graph.microsoft.com/v1.0/me with an Authorization: Bearer header. However, in the response body I'm getting something like this: { "@odata.context":…
11
votes
1 answer

Create or Update SharePoint ListItem with hyperlink field

I am unable to create or update a SharePoint Online listitem that contains a hyperlink field using Microsoft Graph. I can create or update items to the same list if I remove the hyperlink field from the body of the API call. For update, I am sending…
andrew g
  • 164
  • 2
  • 8
11
votes
1 answer

Microsoft graph API access tokens lifetime

I'm having some trouble understanding how to get a Microsoft graph API token that lives more than 3599 seconds. This is my first call to the API to get the first token: And now that I got a refresh token I going to pass it through another call to…
11
votes
5 answers

How can I get the siteId of the current site with Microsoft Graph API?

From the documentation, I can't find any ways to get the siteId of the site where I put the webpart in. For example, My current site is: https://{hostname}/sites/main1 <-- NOT root site, but I want to get this siteId and I test my webpart here:…
PCHC
  • 177
  • 1
  • 2
  • 9
11
votes
3 answers

How to access Sharepoint site's document library via Microsoft Graph API?

I'm working on accessing document libraries for Sharepoint sites via Mircosoft Graph, but haven't had any luck so far. Here is my setup: I have two sites https://mydomain.sharepoint.com https://mydomain.sharepoint.com/teams/MyTestSite When I make an…
jagmohan
  • 2,052
  • 2
  • 26
  • 41