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
8
votes
2 answers

Microsoft Teams access policy - New-CsApplicationAccessPolicy returns 404

I am trying to use the Microsoft Graph API to create OnlineMeetings here https://learn.microsoft.com/en-us/graph/api/application-post-onlinemeetings?view=graph-rest-1.0&tabs=http But when configuring application access policy as instructed…
8
votes
0 answers

How to get aadObjectId of Microsoft Personal Accounts which uses MS Teams

We work on MS Teams bots. Each bot notification contains aadObjectId in request body by which we identify the user. Sample Bot…
8
votes
1 answer

Microsoft Graph: Cross-origin token redemption is permitted only for the 'Single-Page Application

I would like to Redeem the code for access tokens following the Document Authorization and sign-in for OneDrive in Microsoft Graph This is API that I use for this step POST https://login.microsoftonline.com/common/oauth2/v2.0/token I have already…
Siri
  • 91
  • 1
  • 1
  • 4
8
votes
3 answers

Microsoft Identity Web: Change Redirect Uri

I am using .net 5, Identity Web Ui to access Microsoft Graph. Where can I configure my Redirect URI? I need to specify the full Uri, since the generated one from callbackUri is incorrect due to being behind a Load Balancer with SSL offload. Here is…
8
votes
1 answer

Access token validation failure. Invalid audience

I need help in the context of error = I am getting "message": "Access token validation failure. Invalid audience.", I am using the Authorisation code grant type in Oauth. I have mapped custom claims to the app using Azure AD policy. So If I…
Suuny
  • 117
  • 1
  • 1
  • 9
8
votes
1 answer

"MailboxNotHostedInExchangeOnline" when trying to get user photos from MS Graph

Using `https://graph.microsoft.com/beta/users/${email}/photo/$value` had been working for me last week but now it throws a 400 error Error Output "Mailbox is hosted by an on-premise or non-Exchange server, which is not supported." As far as I know…
8
votes
2 answers

How to update identities collection for existing B2C User using Microsoft Graph and SDK

I am trying to update the identities collection for an existing User in an Azure AD B2C tenant. Specifically, I am attempting to add another federated identity entry for the user. According to the Microsoft Graph documentation this should be…
spoida
  • 2,655
  • 1
  • 23
  • 14
8
votes
3 answers

Calling Microsoft Graph API using user context/user token C#

I have a web application where user logins using the approach defined in this sample. Now I want to call Microsoft Graph for this User. I have gone through many documents and it's very confusing how this should be done. This is what I have tried. I…
user911
  • 1,509
  • 6
  • 26
  • 52
8
votes
4 answers

How do I connect to Exchange Online using OAuth 2.0 in MailKit?

I have a web application that sends e-mails to users via Exchange Online (Office365) using MailKit and Basic Authentication. Our company is MS partner and therefor is obligated to turn off Basic Authentication for our services by the end of february…
8
votes
1 answer

OneNote API is not returning new pages (even via ms graph explorer)

I'm a creator of an app that integrates with OneNote API via Microsoft graph SDKs for Android/iOS. Several of my users reported that the new OneNote notes stopped syncing with the app (hundreds more affected by this). I've been debugging this. And I…
AndroidGecko
  • 14,034
  • 3
  • 35
  • 49
8
votes
2 answers

Microsoft Graph API intermittent error "Token not found: token is either invalid or expired" resolves itself after retry

I am making requests to the Microsoft Graph REST api (beta), specifically to the sign-in event endpoint: https://graph.microsoft.com/beta/auditLogs/signIns I am making batch requests that retrieve sign-ins for a particular user in batches of 1000.…
GoogieK
  • 371
  • 2
  • 14
8
votes
1 answer

Unable to update Hyperlink or Picture in SharePoint via Microsoft Graph

I am trying to update a value on a list item (type is Hyperlink or Picture). When performing GET requests, the data return fine, but when I try to create an item or udpate it with the value I end up with following: { "error": { "code":…
Jan Hajek
  • 633
  • 5
  • 20
8
votes
1 answer

Microsoft Graph Calendar API - TargetIdShouldNotBeMeOrWhitespace error

We use Microsoft Graph API's to create a calendar in outlook Following is the HTTP Request POST https://graph.microsoft.com/v1.0/users/me/calendars Content-type: application/json { "name": "My Calendar" } It was working for the last 2 years.…
Hari Prasandh
  • 467
  • 2
  • 13
8
votes
2 answers

Can't Update Sharepoint Managed Meta Data Field from Microsoft Graph Explorer

I'm trying to update the fields associated with a list item via Graph Explorer, https://developer.microsoft.com/en-us/graph/graph-explorer (or a REST API call). For one of the fields, its value can be one item from a term set (managed meta data). I…
jjaazz
  • 105
  • 1
  • 9
8
votes
1 answer

Outlook Mail API returns spellcheck class names as part of html response when using List Messages

I am currently using the outlook mail api to retreive messages from a specific shared folder (List Messages Request), when i get a response from the query i want to read the body content in this case my header prefers html. What i'm trying to…
Owen Pattison
  • 314
  • 2
  • 6