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
13
votes
3 answers

Microsoft Azure AD - error_description:Due to a configuration change made by your administrator, or because you moved to a new location etc

I am facing ERROR like below when connecting Microsoft Azure AD after enabling MFA. Before that it gets connected. Today while login, it required me to enable this security feature in my Phone(Microsoft Auithenticator APP). Unless this feature…
13
votes
2 answers

Download files from personal OneDrive using Python

I have a Python script that is running periodically on an AWS EC2 Ubuntu machine. This script reads data from some files and sometimes changes data in them. I want to download these files from OneDrive, do my own thing with them, and upload them…
Hugo Neves
  • 464
  • 2
  • 4
  • 13
13
votes
3 answers

Failure to generate access token using refresh token for O365 API

I'm getting invalid_grant error while generating access token using refresh token POST https://login.microsoftonline.com/common/oauth2/v2.0/token Response { "error": "invalid_grant", "error_description": "AADSTS50173: The provided grant has…
13
votes
3 answers

Microsoft Graph API not returning refresh token

I created an app on https://apps.dev.microsoft.com with the following Application Permissions: Calendars.Read (Admin Only) Calendars.ReadWrite (Admin Only) User.Read.All (Admin Only) The following is the only flow that has worked for me to be able…
karel
  • 468
  • 5
  • 14
13
votes
1 answer

Sort Events by Start Date

I need to be able to get the events in both directions ASC/DESC using Microsoft Graph API. I'm trying the following API to achieve that: https://graph.microsoft.com/v1.0/me/events?$orderby=start However, when I perform the request I get the…
dvelopp
  • 4,095
  • 3
  • 31
  • 57
13
votes
3 answers

Microsoft Graph API BadRequest Current authenticated context is not valid

I am trying to develop a simple background app to connect to my onedrive account (work) and regularly download some files. I followed this tutorial…
redacted
  • 3,789
  • 6
  • 25
  • 38
13
votes
1 answer

How do I filter and select inside a expanded collection on Microsoft Graph?

This code works https://graph.microsoft.com:443/v1.0/me/drive/root?$filter=Size eq 0&$expand=children($select=id,folder,name,parentReference,cwebUrl)&$select=Id,folder,name,parentReference,children,webUrl I want to filter inside the…
XzaR
  • 610
  • 1
  • 7
  • 17
13
votes
2 answers

Resource parameter when requesting access token?

I'm following this guide to authenticate with Microsoft Graph. I am able to successfully do the first request (for an authorization code) but am having issues with the second request (requesting an access token). Params for the second request (for…
twbbas
  • 407
  • 3
  • 9
  • 19
12
votes
1 answer

Microsoft graph : UnhandledPromiseRejectionWarning: PolyFillNotAvailable: Library cannot function without fetch. So, please provide polyfill for it

Microsoft graph throws the below exception when initializing the client using the access token the access token was generated just before initializing the client & also the same token works in post-man what is that I'm doing wrong? code let…
ChinnarajS
  • 644
  • 5
  • 20
12
votes
7 answers

Check if Graph API folder exists

I am using Microsoft Graph API and I am creating a folder like so: var driveItem = new DriveItem { Name = Customer_Name.Text + Customer_LName.Text, Folder = new Folder { }, AdditionalData = new Dictionary() { …
user979331
  • 11,039
  • 73
  • 223
  • 418
12
votes
1 answer

Access OneDrive personal vault through API

Microsoft introduced a special folder in OneDrive (I only see it in a personal OneDrive account, not in OneDrive for Business) called "Personal Vault". I searched the documentation of MS Graph API but could not find this mentioned. So my question…
Philipp
  • 11,549
  • 8
  • 66
  • 126
12
votes
1 answer

Where can I find APP ID URI for Microsoft App?

I am trying to log in as my registered app, with the permissions granted on: Azure Portal > App registrations > App registrations (Preview) > My App Name - API permissions According to this documentation, I have to pass my resource identifier (APP…
12
votes
2 answers

how to schedule meeting in MS Teams through Graph API

I would like to create/read meetings on calender that shows in MS Teams. I have office 365 business essentials paid subscription that I use to log onto MS Teams. Would like to clarify here below: 1) the calender I see in MS Teams with my…
user2494444
  • 153
  • 1
  • 2
  • 10
12
votes
3 answers

Microsoft Graph API token validation failure

I would use Microsoft Graph API in my Angular Web application. First I make connexion using msal library When I try log in with my profil I get this error I have configured my app as the mentionned in the official git sample MsalModule.forRoot({ …
12
votes
0 answers

Microsoft Graph - Download content in one request

I am using the following method in a web browser to fetch file contents of a DriveItem using the Microsoft Graph: GET /drives/{drive-id}/items/{item-id} // Get the @microsoft.graph.downloadUrl property of the returned DriveItem GET…
Hlynur
  • 491
  • 2
  • 11