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

AADSTS70011: The provided value for the input parameter 'scope' is not valid

So I have a scenario wherein the application should add users to a group on certain conditions. Also when the application starts running users should not be asked to login their microsoft id/pwd. So I access the token I created using Graph Service…
sidi shah
  • 889
  • 2
  • 7
  • 7
35
votes
1 answer

When should I use Outlook REST API vs Microsoft Graph API?

I am working on an application that needs to retrieve and edit calendar events from Outlook.com and Office 365. I have seen there are 2 options: Outlook REST API Microsoft Graph API They seem to have pretty much the same interface. I saw that…
JeroenB
  • 451
  • 4
  • 10
30
votes
5 answers

SharePoint Rest API how to get Access Token?

Just starting to work with SharePoint and Microsoft authentication and trying to get a SharePoint List into a JavaScript App. From Microsoft documentation, I need to use the following: GET https://{site_url}/_api/web/lists/GetByTitle('List…
L H
  • 1,145
  • 3
  • 12
  • 25
28
votes
5 answers

Microsoft Teams : REST APIs

I'm interested in getting data (metadata and content of files) out of Microsoft Teams into my application using REST APIs. I have looked at Office 365 APIs and Graph APIs but, I could not find supporting documentation for Microsoft Teams.
Supreetha Upadhya
  • 281
  • 1
  • 3
  • 4
27
votes
0 answers

Getting error code `ErrorIrresolvableConflict` responses when trying to create events on a calendar using Outlook REST API

In the last few days (starting on Oct 28, 2019), without any code change on our part, we've started seeing a significant amount of requests from our server to create events on a calendar (using this endpoint:…
lior
  • 537
  • 4
  • 13
27
votes
2 answers

Unable to filter messages by recipient in Microsoft Graph Api. One or more invalid nodes

I am trying to get a list of messages that are filtered by recipient from Microsoft Graph API. The url I am using for the request is: https://graph.microsoft.com/beta/me/messages?$filter=toRecipients/any(r: r/emailAddress/address eq '[Email…
Dave
  • 3,676
  • 4
  • 28
  • 39
26
votes
5 answers

Accessing Microsoft Graph API without using login page

I would like to access a user's one drive to upload a document or retrieve a document using Graph API. I've seen multiple examples over the net which requires using the standard login page for the user to login. You need to get the authorization…
23
votes
4 answers

How to refresh a token for Microsoft Graph

I'm connecting to the Microsoft Graph using: public GraphServiceClient GetAuthenticatedClient(string token) { GraphServiceClient graphClient = new GraphServiceClient( new DelegateAuthenticationProvider( async (requestMessage)…
Hugo Hilário
  • 2,848
  • 2
  • 27
  • 43
23
votes
7 answers

Get all user properties from Microsoft graph

We have an application which has used a local AD to fetch user info. Some customers want to move to the cloud and are using Azure AD. We extended the app to sign users in via owin and now we're fetching users via Microsoft Graph. However from…
22
votes
3 answers

Using authProvider with MS SDK for graph calls in C#

I'm trying create a C# console application to connect to graph API and get a list of users from AzureAD from a tenant. I have registered the app and the admin has given me the following Tenant Name and Tenant ID Client ID (also sometimes called App…
gtrivedi
  • 435
  • 1
  • 7
  • 18
22
votes
2 answers

How can I get the guids of Graph API permissions programmatically for an Azure AD application?

I am trying to add required permissions to an Azure AD application. I already know how to replicate information from a downloaded manifest through a PATCH REST call, e.g. "requiredResourceAccess": [ { "resourceAppId":…
Carl in 't Veld
  • 1,363
  • 2
  • 14
  • 29
20
votes
3 answers

Microsoft Graph Api User.Read.All Not granted for my domain

I am getting the following error or status Not granted for my domain. see the attached document Is this because my role is User? I tried to find who is Azure AD Global Administrator? I followed the following steps: Log into the Azure Portal…
ozil
  • 6,930
  • 9
  • 33
  • 56
20
votes
3 answers

How can I change default tenant in Microsoft Graph Explorer

I am working with Graph Explorer to experiment with permissions: https://developer.microsoft.com/en-us/graph/graph-explorer When I authenticate to Graph Explorer, it always sends queries to the AD tenant that my identity is created in. However, the…
Allan Xu
  • 7,998
  • 11
  • 51
  • 122
20
votes
7 answers

Tenant does not have a SPO license

I have an error while trying to use Microsoft Graph to write a script to upload an Excel file to OneDrive then read the Excel file. I followed Microsoft documentation to obtain the access token without user. I successfully got an access token but I…
Ken Pham
  • 203
  • 1
  • 2
  • 5
19
votes
7 answers

How to get user id from email address in Microsoft Graph API C#

I want to add User to a Group but I don't have the User's id, I only have the email address. Here is the code: User userToAdd = await graphClient .Users["objectID"] .Request() .GetAsync(); await graphClient .Groups["groupObjectID"] …
sidi shah
  • 889
  • 2
  • 7
  • 7
1
2 3
99 100