r/GraphAPI • • Aug 19 '25

Candidate not receiving Outlook calendar invite after interview scheduling (Graph API 409 error)

2 Upvotes

Hey folks,

I’m running into an issue with interview scheduling in our ATS that integrates with Outlook via Microsoft Graph API. A candidate scheduled their second interview, but they never received the calendar invite. The interviewer/manager did get the invite on their calendar, but the candidate didn’t. Even sending an RSVP reminder didn’t help.

Looking at the logs, I noticed that when the event was being created, Microsoft Graph returned a 409 error (ConcurrentItemSave) with the message:

It looks like the calendar event creation failed for the candidate, which explains why they didn’t get the invite.

Has anyone else seen this Graph API 409 ConcurrentItemSave error when creating calendar events? How did you resolve it? Is this something I should be retrying on my end, or does it point to an issue with the Outlook mailbox itself?

Any insights would be much appreciated!


r/GraphAPI • • Aug 09 '25

Automating non complaint device reports from Intune 😎

2 Upvotes

r/GraphAPI • • Jul 27 '25

Delta queries in Action 😎

2 Upvotes

r/GraphAPI • • Jul 24 '25

I'm running a graph api channel and wanted few suggestions on how can I make it better?

2 Upvotes

I have videos on virtually every topic now. I wanted to see if anyone has any idea on which direction I can take my channel to so it helps people from graph API community? https://youtube.com/@microsoftgraphexplorer?si=QNkqx_AATfOGCw1r


r/GraphAPI • • Jul 23 '25

Graph Api batching

Thumbnail
doitpshway.com
2 Upvotes

Post about a huge performance boost that you can have when using Graph Api batching.

But mainly a solution to all the problems it has (missing pagination support etc).


r/GraphAPI • • Jul 16 '25

Getting SharePoint Managed Metadata Fields via Graph API

2 Upvotes

I'm running into an issue with the Microsoft Graph API and could really use some help.

I'm trying to retrieve the value of a managed metadata field from a SharePoint list item. When I execute the following request on my test SharePoint environment, everything works fine and I receive the expected metadata (also Term value):

Request:

https://graph.microsoft.com/v1.0/sites/test.sharepoint.com,c**************/lists/************/items/46/fields?$select=Categori

and production url:

https://graph.microsoft.com/v1.0/sites/prod.sharepoint.com,0**************/lists/********************/items/22292/fields?$select=Client

Response (for demo the Graph Explorer used):


{
    "@odata.context": "***************",
    "@odata.etag": "***********",
    "@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET sites('<key>')/lists('<guid>')/items('<key>')/fields?$select=id",
    "Categori": [
        {
            "Label": "Anleitungen",
            "TermGuid": "508ba****************",
            "WssId": 1
        }
    ]
}

However, when I try the same request in the production environment, targeting a different metadata field (named Client), the field is always returned empty, even though it has a value in the SharePoint UI.

Response in production:

{
  "AdditionalData": {
    "@odata.context": "***************",
    "@odata.etag": "****************",
    "Client": {}
  },
  "BackingStore": {
    "ReturnOnlyChangedValues": false,
    "InitializationCompleted": true
  },
  "Id": null,
  "OdataType": null
}

A few additional details:

  • The Client field in production is a single-value managed metadata field (unlike Categori in test, which is multi-value). But I also tried when Client is set to multi-value.

  • I’ve tried various combinations of $select and $expand, but the result is always the same.

  • Interestingly, I can successfully update the Client field from the c# application using the guidance from this StackOverflow post, so write access works.

  • Other custom fields (non-managed metadata) return values correctly.

  • I'm using the Microsoft Graph SDK for .NET (Microsoft.Graph version 5.56.0).

and the request is made like that:

   var result = await graphServiceClient.Sites[siteId].Lists[listId].Items[listItemId].Fields.GetAsync((requestConfiguration) =>
                    {
                        requestConfiguration.QueryParameters.Select = new string[] { "client" };
                    });

Has anyone experienced a similar issue where a managed metadata field (especially a single-value one) returns an empty object when reading through Graph API, despite having a value?

Any ideas on what could be wrong or what else I could try?

Thanks in advance!


r/GraphAPI • • Jul 01 '25

Get notification of expiring secrets using Graph API.

2 Upvotes

r/GraphAPI • • Jun 18 '25

Graph API Log Tailing - Entra Sign In Logs

2 Upvotes

I wrote a script that pulls sign in logs from the graph api and then shoves them into a log file which flows thru: alloy -> loki -> grafana I plan to run the script every hour. I'm getting the timestamp of the last log and using that as a filter to only download new logs by incrementing it by one second. My question is: Does the api guarantee in some way that I'll get all logs for a given second? Example: I download sign in logs with createdDateTime ge 2025-06-18T20:54:26Z , and my last log I download has 2025-06-18T20:57:27Z . The script runs again with createdDateTime ge 2025-06-18T20:57:28Z . Is it possible there exists a log file after the one I downloaded at 2025-06-18T20:57:27Z ? If so, my method would miss that log. I suspect I'll just have to test this but was curious what other people do for tailing O365 logs into Grafana or SIEMS?


r/GraphAPI • • Jun 09 '25

Now Send Email using function app and Graph api

2 Upvotes

r/GraphAPI • • Apr 28 '25

get-MgUserMailfolder Access Denied issue

2 Upvotes

Good day all,

I have been trying to get user mailbox inbox total count and unread count using get-MgUserMailfolder and I get Access Denied.

I am connecting with a Global admin account.

Any help will be greatly appreciated.


r/GraphAPI • • Apr 11 '25

Simple MS Graph API PowerShell Module

2 Upvotes

Hi all,

For a larger Entra ID enumeration script, I wanted to move away from the official Microsoft Graph PowerShell modules, since they’re not always available on customer systems. Furthermore, some API calls are not available (PIM for Group related stuff).

I ended up creating a simple, single-file PowerShell module to work directly with the Graph API.

It handles the usual stuff like:

  • Automatic Pagination

  • Retry logic (with backoff for throttling (HTTP 429), or other errors like HTTP 504 etc.)

  • v1.0 / beta endpoint switch

  • Query parameters and custom headers

  • Simple proxy support

  • Basic error handling and logging

Maybe it is useful for someone else: https://github.com/zh54321/GraphRequest


r/GraphAPI • • Apr 08 '25

Scopes for Microsoft Graph Command Line Tools

2 Upvotes

In Entra under the sign in logs for Microsoft Graph Command Line Tools I can see which user has logged in to the app context. Under the Addtional Details I can also see the scopes that the user used when trying to log in. So the data is there and I can access it. Does anyone have a Powershell script on how I can get this data? I have already made several attempts to get the data, also via chatgpt. I just can't get it to display the scopes for the sign in


r/GraphAPI • • Mar 25 '25

Send message to private channel in Teams

2 Upvotes

Is it possible to send a message to a private channel in Teams via Graph / CURL?

We have read many recommendations to solve this via Power Automate / Flow, but this probably does not work with private channels “Sending a message in private channels isn't supported.”

https://learn.microsoft.com/en-us/power-automate/teams/send-a-message-in-teams

In principle there is a good documentation: https://learn.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-1.0&tabs=http

and also an example in Graph Explorer:
https://developer.microsoft.com/en-us/graph/graph-explorer
https://graph.microsoft.com/beta/teams/{group-id-for-teams}/channels/{channel-id}/messages

What I don't understand is how to set the permissions on AzureSite, if I understand correctly, this is only possible as a delegated user and not as an application.
https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=powershell#tabpanel_1_powershell

Sending message to a channel is not supported with application permissions, it is only supported in delegated context. Application permissions are only supported for migration. Please refer these documents to send message to a channel using Graph in delegated context -

https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=powershell#tabpanel_1_powershell

https://learn.microsoft.com/en-us/powershell/microsoftgraph/get-started?view=graph-powershell-1.0

Can anyone help me with step-by-step instructions on how (or whether) this can be solved?

Thx a lot.


r/GraphAPI • • Mar 21 '25

Sharepoint site permission assignment via GraphAPI broken?

2 Upvotes

Hi There

Just trying to define a site for the GraphAPI permission "Sites.Selected" in a app registration.
The following applies:

- Roles: Sharepoint Admin, Application Developer
- Site owner of the respective Sharepoint site

The Powershell snipped i've try to run:

Connect-MgGraph -Scopes "Sites.Manage.All"
$AppID = "8866c719-6ec4-4ec4-ad02-83e27ccdfd99" #Randomized
$SiteID = "foobar.sharepoint.com,a1b2c3d4-5678-90ab-cdef-1234567890ab,9876fedc-ba09-8765-4321-abcdef123456"  #Randomized

$Body = @{
    roles = @("write")
    grantedToIdentities = @(@{ application = @{ id = $AppID } })
} | ConvertTo-Json -Depth 3

$Uri = "https://graph.microsoft.com/v1.0/sites/$SiteID/permissions"
Invoke-MgGraphRequest -Uri $Uri -Method POST -Body $Body -ContentType "application/json"

The Error i get looks about like this (Randomized as well):

Invoke-MgGraphRequest : POST https://graph.microsoft.com/v1.0/sites/foobar.sharepoint.com,a1b2c3d4-5678-90ab-cdef-1234567890ab,9876fedc-ba09-8765-4321-abcdef123456/permissions
HTTP/1.1 403 Forbidden
Transfer-Encoding: chunked
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000
request-id: 98765432-abcd-4321-efgh-567890abcdef
client-request-id: abcdef12-3456-7890-abcd-ef1234567890
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"SomeRegion","Slice":"X","Ring":"Y","ScaleUnit":"123","RoleInstance":"XYZ123"}}
Link: <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=v1.0,Removal&from=2021-09-01&to=2021-10-01>;rel="deprecation";type="text/html", <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=v1.0,Removal&from=2021-09-01&to=2021-10-01>;rel="deprecation";type="text/html"
Deprecation: Fri, 03 Sep 2021 23:59:59 GMT
Sunset: Sun, 01 Oct 2023 23:59:59 GMT
Cache-Control: no-store, no-cache
Date: Fri, 21 Mar 2025 10:02:10 GMT
Content-Encoding: gzip
Content-Type: application/json
{"error":{"code":"accessDenied","message":"Access denied","innerError":{"date":"2025-03-21T10:02:10","request-id":"98765432-abcd-4321-efgh-567890abcdef","client-request-id":"abcdef12-3456-7890-abcd-ef1234567890"}}}

What am I doing wrong?
Has Microsoft removed GraphAPI support for assigning site permissions?


r/GraphAPI • • Mar 11 '25

E-Discovery Search

Thumbnail
learn.microsoft.com
2 Upvotes

Hi All, I’m in the process of exploring the graph api. I’ve got as far as creating a case & created a search query using the above attached article. If I go into the portal this seems to create the search and query but doesn’t run it. I’ve looked through the documentation but can’t quite see how I trigger this to run?

Any help or suggestions would be greatly appreciated. I’m currently using https requests via invoke-restmethod in powershell.


r/GraphAPI • • Feb 05 '25

Subscription end dates

2 Upvotes

Hi all, has anyone found a way of extracting subscription/contract/agreement expiry dates?

/directory/subscriptions lists all of the unit counts for each license and includes nextLifecycleDateTime. However, this shows is misleading for monthly billed licenses. It appears that it is not accomodating NCE licenses.
How can I find whether a subscription is:
monthly billed / 1yr commit
annually billed / 1yr commit
annually billed / 3yr commit

And also find the true renewal date, not just the next billing date?

Thanks


r/GraphAPI • • Feb 03 '25

How do you re-assign a primary user to an Intune device with the Graph API

2 Upvotes

We're struggling with finding a way to use the Graph API to re-assign a primary user to a device in Intune. We've built a custom loaning center application where we'd need to replace the primary user whenever a device is checked out so that the customer can access the Company Portal. We've tried a variety of API actions, some of which existed in the beta version of the API, which no longer exist or are no longer options. We've tried

https://graph.microsoft.com/v1.0/deviceManagement/windowsAutopilotDeviceIdentities/{windowsAutopilotDeviceIdentityId}/assignUserToDevice

Patching this with the body of the request being the userPrincipalName:

https://graph.microsoft.com/v1.0/deviceManagement/managedDevices/{managedDeviceId}

The last one looks like it should work, but we get an error when running it. Does anyone have thoughts on how to get this to work, assuming it can or we should be able to do it?


r/GraphAPI • • Feb 01 '25

Requist acces token customer

2 Upvotes

Hey everyone,
I am trying to build an app that can add appointments into their calendar. For this I need an acces token. I use python code to do this:

SCOPES = ["User.Read", "User.Export.All"]
app = PublicClientApplication( O365_CLIENT_ID, authority=AUTHORITY, )
flow = app.initiate_device_flow(scopes=SCOPES)
print(flow["message"])
webbrowser.open(flow["verification_uri"])
result = app.acquire_token_by_device_flow(flow)

the problem is when I input my code into the signin website and sign in with my account, I get the error that the code is epired. Iam using the codes immedialty after generation and am allowed to log in but when it should go to the authorization screen it tells me that my code expired. Which is unexpected, because normally it give that error before login.

when I set the authorization url to AUTHORITY = 'https://login.microsoftonline.com/your_tenant_id' I am able to login, but only with my orginistation emails and not emails of customers.

is there anybody that can help me with this. If anybody knows how to do this in curl that would be good as well.


r/GraphAPI • • Jan 22 '25

Can you create a planner task with markdown in the description?

2 Upvotes

This is driving me kind of nuts - I can edit a planner task which has no markdown in the Teams client or web client format it with markdown. If I edit a URL it'll become a hyperlink and become clickable, if I enclose a word with ** it'll work, etc.

When I query that event via the API I then see the markdown updates I made. I've verified that the event preview mode is set to 'description.' When I edit add markdown manually this is unchanged, and the markdown renders as expected.

However, when I create events with Markdown in the notes/description, I only see the literal text of the Markdown from teams and the teams client.

Is there something I'm missing? Has anyone been able to use markdown via graph, regardless of the client? I'm using Java, but I just want to know it's possible, be it powershell, c#, javascript, whatever. I'm just trying to gauge if I'm working toward something that's actually possible.


r/GraphAPI • • Jan 01 '25

Did /me/drive/special/photos/delta?expand=thumbnails just stop working?

2 Upvotes

For 2 years, I have been using the endpoint 

https://graph.microsoft.com/v1.0/me/drive/special/photos/delta?expand=thumbnails to sync the latest photos from special OneDrive photos folder including thumbnails.  3 days ago, suddenly started getting a 400 error on the URL.  So if I remove the expander, the endpoint works but now location:{} is empty too.

So did I miss a notification that features were going away?  Or is Graph seeing some issues right now?  

You can also reproduce in Graph Explorer with personal OneDrive.

Any one else seeing this behavior?


r/GraphAPI • • Nov 14 '24

All emails sent via Graph from sandbox tenant are rejected by receiving

2 Upvotes

I'm developing a .NET application that needs to create and send email messages via the Graph API. That part is all working fine. However all emails created this way are rejected by the recipient:

Your message was rejected by the recipient email server. Please check the recipient's email address and try resending your message, or contact the recipient directly. For more tips to help resolve this issue, see DSN code 5.1.0 in Exchange Online - Office 365. If the problem continues, contact your email admin.

The domain is via the Azure Developer Sandbox i.e. of the form blah.onmicrosoft.com. If I go to outlook.com and log in as one of the test users that is created with the sandbox, I can create and send a mail successfully.

Regarding DMARC, SPF and so forth - I assume that is all set at the onmicrosoft.com level. So why is it failing ?


r/GraphAPI • • Oct 17 '24

Seeking Help with Graph API Permissions for Meta Platforms Marketing Analysis

2 Upvotes

Hi everyone!

I’m currently working on a project to analyze how businesses in EU market themselves on Meta platforms, and I've hit a roadblock. We’ve been trying to extract data using the Graph API for a few weeks now but haven't had much luck.

We’ve verified our account and ensured that our token has all the necessary permissions enabled. However, we keep encountering issues indicating that our token lacks the right permissions. We haven’t applied for advanced permissions in our settings, but from what I’ve read in the documentation, it doesn't seem like that should be necessary.

Has anyone else experienced similar issues or can offer insights on how to properly set up permissions for the Graph API? Any tips or guidance would be greatly appreciated!

Thanks in advance for your help!


r/GraphAPI • • Oct 01 '24

Command to disable for all users

2 Upvotes

Trying to disable apps in M365. this works for 1 user. How do I get it to work for all users?

Get the services that have already been disabled for the user.

$userLicense = Get-MgUserLicenseDetail -UserId "[email protected]"

$userDisabledPlans = $userLicense.ServicePlans | Where ProvisioningStatus -eq "Disabled" | Select -ExpandProperty ServicePlanId

 

Get the new service plans that are going to be disabled

$e3Sku = Get-MgSubscribedSku -All | Where SkuPartNumber -eq 'SPE_E3'

$newDisabledPlans = $e3Sku.ServicePlans | Where ServicePlanName -in ("SHAREPOINTWAC", "SHAREPOINTENTERPRISE") | Select -ExpandProperty ServicePlanId

 

Merge the new plans that are to be disabled with the user's current state of disabled plans

$disabledPlans = ($userDisabledPlans + $newDisabledPlans) | Select -Unique

 

$addLicenses = @(

@{

SkuId = $e3Sku.SkuId

DisabledPlans = $disabledPlans

}

)

Update user's license

Set-MgUserLicense -UserId "[email protected]" -AddLicenses $addLicenses -RemoveLicenses @()


r/GraphAPI • • Sep 23 '24

Best practice for enterprise app permissions

2 Upvotes

Hello everyone,

we are currently developing a small application in .Net for internal stuff that relies heavily on the GraphAPI to send emails, retrieve emails from a shared mailbox, add users to groups etc.

Now we have somewhat of a stalemate between the developers and the sysadmins and after I searched through all the docs can’t really find a best practice approach.

As the app consists of different modules/functions that need different permissions like sendmail, receive mail etc. our sys admins say that each module needs his own Entra Enterprise registration.

The devs point of view is that the one application should be given all the rights it needs for all the modules.

I’m somewhere in the middle, with normal enterprise apps I put in scopes for admins, users etc. but it seems that isn’t the case if you are not using delegated access with GraphAPI but the approles.

Can anybody give me some pointers what would be the best way to handle this?