r/GraphAPI • • Mar 18 '26

Getting message via Instagram graph API

1 Upvotes

I am working on chatbot for instagram that will be able to answer to dm's. Problem that i have encountered is that all messages that are being recieve are being recieved as message_edit, and not messages and that causes it so that i cannot see the message user sent. When i edit the message i already sent, it shows that eddited message correctly. Anyone had the same problem, and any tips on how to fix it. Thanks


r/GraphAPI • • Mar 03 '26

Test Http call in instagram api

1 Upvotes

I need to make a test http call to release app submission at permission 'instagram_business_manage_comments'

I did:

1 - Added my instagram as a test user

2 - Generate a token with instagram_business_manage_comments permission through oauth

3 - Made a http call to fetch my instagram name using such token

It's 4 days since and the submission is still blocked. Should I test this token in a endpoint which requires instagram_business_manage_comments permission? as fetch/delete/manage comments? I released this permission before but I'm can't remember what I actually did.


r/GraphAPI • • Feb 13 '26

Automating Soft Deletion and Security Actions Using Microsoft Graph

1 Upvotes

I’ve been researching this topic on the platform and found several discussions that seem related, but I’m still not fully clear on how it works in practice.

My question is: Is it possible to approve or perform soft deletion actions through Microsoft Graph or any related API?

Specifically, I’m looking to integrate this capability with an external application as part of an automated workflow (for example, triggering or approving soft-delete actions programmatically).

I came across the following Microsoft Graph documentation for securityAction:

https://learn.microsoft.com/en-us/graph/api/resources/securityaction?view=graph-rest-beta

However, I couldn’t find clear or practical examples that explain how this resource is actually used, or whether it supports the type of approval or soft-deletion workflow I’m trying to implement.

Does anyone have experience with this API or insight into whether it can be used for this purpose, or if there is a recommended alternative approach?


r/GraphAPI • • Feb 10 '26

𝐔𝐬𝐢𝐧𝐠 𝐌𝐢𝐜𝐫𝐨𝐬𝐨𝐟𝐭 𝐃𝐞𝐯 𝐏𝐫𝐨𝐱𝐲 𝐭𝐨 𝐈𝐝𝐞𝐧𝐭𝐢𝐟𝐲 𝐄𝐱𝐜𝐞𝐬𝐬𝐢𝐯𝐞 𝐌𝐢𝐜𝐫𝐨𝐬𝐨𝐟𝐭 𝐆𝐫𝐚𝐩𝐡 𝐏𝐞𝐫𝐦𝐢𝐬𝐬𝐢𝐨𝐧𝐬 𝐢𝐧 𝐘𝐨𝐮𝐫 𝐏𝐨𝐰𝐞𝐫𝐒𝐡𝐞𝐥𝐥 𝐒𝐜𝐫𝐢𝐩𝐭𝐬

Thumbnail thelazyadministrator.com
1 Upvotes

r/GraphAPI • • Jan 27 '26

Supersedense or 2nd update application in a large organization

Thumbnail reddit.com
1 Upvotes

r/GraphAPI • • Dec 16 '25

423 Locked exception when uploading file via Microsoft Graph

Thumbnail reddit.com
1 Upvotes

r/GraphAPI • • Dec 07 '25

How can I get both Defender API + Graph API tokens with a single MSAL login?

1 Upvotes

Hi everyone,

I'm using MSAL and I want to sign in once, but acquire two tokens:

My flow right now:

  1. Interactive login → request Defender scopes

  2. extraScopesToConsent = graphScopes

  3. After login I try to get Graph token silently

  4. Silent fails → MSAL opens a second login window

What I want:

✔ One single login window
✔ User consents to both Defender + Graph scopes at the same time
✔ Then: Defender token + Graph token (no second prompt)

My question:

👉 Is it possible to get tokens for two different resources (Defender + Graph) with one interactive MSAL login?
Should I merge all scopes into one request, or is the second login unavoidable due to different resource audiences?

Any working solution or best practice is appreciated.


r/GraphAPI • • Nov 23 '25

Get IG Media help

1 Upvotes

I'm currently doing a MSC Data Science project and would like to get my own data from Instagram.

I am using Instagram API with Facebook Login

My access token has the following permissions:

  • read_insights

  • pages_show_list

  • ads_read

  • Instagram_basic

  • pages_read_engagement

I can pull top_media for a hashtag, but when I try and get more fields via get IG Media the error

"Unsupported get request. Object with ID 'XXXXXXXX' does not exist, cannot be loaded due to missing permissions, or does not support this operation"

I understand that I can only do this call on posts by professional accounts.

Are all the posts I've got truly from personal accounts or am I missing a permission?

The docs doesn't mention requiring advanced permissions, I don't think I get can these since I'm not truly a business and advanced permissions requires business verification


r/GraphAPI • • Oct 31 '25

Beta Graph API - deviceRunStates- filter not works

Thumbnail reddit.com
1 Upvotes

r/GraphAPI • • Oct 28 '25

Instagram Graph API nightmare — works for testers but not for real users 😩 (access token + webhook issue)

Thumbnail reddit.com
1 Upvotes

r/GraphAPI • • Oct 14 '25

Set email retention policy

1 Upvotes

I'm trying to use power automate to set email retention policies. Is this possible with the graphapi?

I see setretentionlabel method for SharePoint sites but not emails. It seems like this might require extended properties for emails?


r/GraphAPI • • Sep 26 '25

Deprecation of teamworkDevices device management API

1 Upvotes

Looks like teamworkDevices API to monitor teams enabled devices will be deprecated in November 2025. I can see the notice on the web site.

Does anyone know what will replace the whole teamwork api endpoint group? I haven’t heard anything and it is almost November.


r/GraphAPI • • Sep 18 '25

Issue on internal column name

1 Upvotes

Is there any way I can get the external column name instead of internal name when doing "/items?$expand=fields" ?
Also why other columns has current external name while other columns start with "field_xx" ?


r/GraphAPI • • Sep 17 '25

Channel Message subscriptions can't be created?

1 Upvotes

Hi,

I've have a service that makes calls as a delegated user and one of those calls is subscribing to channel message events in all of a user's given channels. While I am able to list messages and post messages to these channels, I somehow am completely unable to create a subscription to a channel's message events. Has there been a recent breaking change to how subscriptions are created? Here's an example of the error I'm seeing:

"Operation: Create; Exception: [Status Code: Forbidden; Reason: Caller does not have access to '/teams('<team_id>')/channels('<channel>')/messages' resource]"

In the past I've been able to subscribe to channel message events but for the same user's after deleting my subscriptions and trying again, I get this error. The only scopes listed on the create subscription documentation is `ChannelMessage.Read.All` which I've always had. Anyone else experiencing this?

EDIT: D'oh, it was selecting channels that were not owned by my organization (e.g. cross-org/tenant channels), which is why I could see them but not access them like this the same way.


r/GraphAPI • • Sep 15 '25

Intune report issue

1 Upvotes

We have around 1K devices that are showing up as Unencrypted in the Intune Encryption Report. All have our Encryption Policy applied. I manually connected to some of the devices, and they are either not actually encrypted or encryption is paused. I was looking for a way to retrieve ProtectionStatus and EncryptionPercentage from devices using either PowerShell/Graph or Intune. I would like to know the devices that are in a paused state so I can remediate with a script I've written.


r/GraphAPI • • Aug 29 '25

Filtering mail by "from" address

1 Upvotes

Hi all. I think I might be going crazy and could use another set of eyes on my query. I am trying to get messages from my mailbox using a filter, but it is not working as expected. My current filter checks to see if the from/sender address equals a predetermined address and if the subject contains a specific phrase. I have a list of sender/subject pairs that I iterate over, and most work as expected. However, there are some messages that I'm unable to filter correctly if I include the from/sender address.

Here is my current filter: (from/emailAddress/address eq '[email protected]' or sender/emailAddress/address eq '[email protected]') and contains(subject, 'specific phrase')

To check my sanity, I changed the filter to just the subject containing the phrase, and that returns the emails as expected. I took a look at those messages, and the from/sender addresses are both what I expect (What I had in the original filter). If I change the filter and check if the from/sender address equals a specific sender, I get some emails back, but not the ones I need. I have checked, and there are no other pages returned, so it's not that. I went back and compared the hex values of the characters in the emails found in the previous emails, and they all match my string.

Strangely enough, if I switch to using search and set the query to from:[email protected] subject:specific string, I get the desired emails back.

Has anyone seen this before? Is this a bug, or intended behavior?


r/GraphAPI • • Aug 15 '25

Graph beta: Revoke-MgBetaDriveItemPermissionGrant

1 Upvotes

Need this Revoke-MgBetaDriveItemPermissionGrant command, which enables the ability to remove individual users from SharePoint sharing links without destroying the entire link. Seem like this has been in beta since earl/mid 2024.

Anyone with Beta experience have insight into how long things take to make into production release?


r/GraphAPI • • Aug 15 '25

Copilot interaction with O365 on a per-user basis?

1 Upvotes

A user recently asked (and I think he represents many people) if he can use Copilot to do things on his O365 account. He got as far as having Copilot composing a letter to IT (me) to ask for these specific entries, which reads:

I’d like to request the necessary permissions and configurations to enable Microsoft Copilot to assist with my Outlook and Microsoft 365 tools. Specifically, I’d like Copilot to be able to:

  • Access and update my Outlook calendar (create/edit events, add notes and reminders)

  • Send and draft emails on my behalf

  • Create and manage tasks in Microsoft To Do

  • Add content to OneNote notebooks

Please ensure that the following Microsoft Graph API permissions are enabled for my account or role:

  • Calendars.ReadWrite

  • Mail.Send, Mail.ReadWrite

  • Tasks.ReadWrite

  • Notes.ReadWrite (for OneNote)

  • User.Read and offline_access (if required for persistent access)

To my knowledge, which admittedly is just above zero, I cannot grant these rights for a specific user or role, but instead has to be done in relation to an app that would do these things, and then users or groups would be associated with the app.

As it is, Copilot will not create a meeting and actually enter it in your calendar and send the invitation. The best it can do is pre-fill the popup but the user has to ultimately click 'send,' although it does say that it created such an entry. In my testing, I asked: Does Copilot need permissions to create calendar events for users?

The response: Yes, Copilot (like me) does require permission to create calendar events on your behalf. Here’s how it works:

🔐 Required Permissions To schedule meetings directly on your calendar, Copilot needs: Access to your Outlook calendar via Microsoft Graph. Authorization through your Microsoft 365 account, typically granted by your organization’s IT admin. Active session: The scheduling session must remain valid during the interaction. If it expires (as we've seen), the meeting won't be created. 🛠️ Why Your Meeting Didn't Appear In your case, the scheduling session kept expiring before the meeting could be saved. This could be due to: A temporary issue with session handling. A lack of persistent authorization from your Microsoft 365 environment. A timeout caused by inactivity or delays in confirmation.

If I go into the Graph API settings and add what is suggested here, would that actually work so that users can create calendar entries or compose and send emails directly in the Copilot app? Would that open a huge security hole? Would it simply not work because there is no registered app associated with these tasks?


r/GraphAPI • • Aug 11 '25

Cannot find Microsoft.Graph.Beta.Models.WhatIfAnalysisResponse

1 Upvotes

I Cannot find Microsoft.Graph.Beta.Models.WhatIfAnalysisResponse, but I can use Microsoft.Graph.Models.WhatIfAnalysisResponse (no beta) but so many related data gathering calls are better done in Beta I think, or at least we want that choice. I wrote my own C# classes to deserialize into, but its strange that this is in the non beta sdk but not the beta. Does anyone know what this is? I hate using my own - could miss changes etc. Thanks!


r/GraphAPI • • Jul 30 '25

Get notified on Azure secrets using function app

1 Upvotes

r/GraphAPI • • Jul 26 '25

Heads up - OneNote OCR'd text availability to MS365 CoPilot (via Microsoft Graph API)

Thumbnail reddit.com
1 Upvotes

r/GraphAPI • • Jul 24 '25

setRetentionLabel does not work

1 Upvotes

I hope i can describe my issue well, as i cannot give too much context because this is a work-related issue.

Context:
.NET Framework 4.8 (i know, i know)
Microsoft.Graph v5.87 (Latest)

I have made the successful request to the Graph Rest API to set a retention label after upload using the following request, which worked beautifully:

PATCH https://graph.microsoft.com/v1.0/sites/{siteId}/drives/{driveId}/items/{fileId}/retentionLabel"
payload: { "name": "label_name" }

Now i made the decision to migrate to the Graph SDK, where i followed the documentation to setup this request (as followed by Microsoft Documentation):

var requestBody = new ItemRetentionLabel
{
    Name = "label_name",
};

await graphClient
    .Drives[drive.Id]
    .Items[uploadedFile.Id]
    .RetentionLabel
    .PatchAsync(requestBody);

This does not set the retention label, and also returns null without any exception or error message. I believe i have tried every variation of this request but nothing works. I am sure the retention labels are correctly set and published (because it worked with the REST request) and i even tested with a freshly created and published label.

The GraphClient uses the same access token as the Rest API did, as i have made a custom authentication provider for our "old' authentication model. My other Graph SDK actions (upload & download files, setting custom fields etc) work perfectly, so my GraphClient, AccessToken or retention labels cannot be the issue.


r/GraphAPI • • Jul 21 '25

Is there a way to subscribe to my user being added to new channels on Teams?

1 Upvotes

I'm trying to create some automations for Teams using the Graph API, and one basic thing I want to set up is to be able to react to messages after being tagged/mentioned. The way I've currently set it up is I create a subscription to channel creation events, then when I receive a channel creation event I can then create a subscription for ChatMessage creations in a given Teams channel. Then with those ChatMessage events I can check the ChatMessage resource for any mentions of my user.

However, this does not really work for private channel creations for which I'm not a part of. I'm not interested in subscribing to private channels I'm not a part of anyway, but when I become added to a private channel after-the-fact I don't really have a good way to tell of this channel's existence. I could periodically make a Graph API call to list all the channels my user can see, but that seems a bit janky considering this event-based approach I'm already taking. Looking to get any tips of recommendations for this kind of situation. Thanks!


r/GraphAPI • • Jul 05 '25

Fala rapaziada, alguém já mexeu com graph api? Tenho um freela que to fazendo pra enviar e receber mensagens do teams por ela, mas tenho diversas limitações pelos fornecedores não estarem na organização do meu cliente, tem alguma maneira de contornar isso? Alguém sabe como resolver?

1 Upvotes