r/GraphAPI • • Oct 12 '22

Creation of personal contacts in m365 mailboxes via Graph API is slow

2 Upvotes

Hi all, we are using a PowerShell script to sync contacts from our CRM to our staff personal contacts however are finding that the process is slow and hoping others have found a way to do this in bulk.

We have around 30 mailboxes and around 4,000 contacts. So if at times all contact records have been touched and need to be pushed to m365 mailbox personal contacts, this takes about 2-4 secs per record, sometimes longer.

We've looked at parallel processing however then we run into throttling issues by the server.

If anyone has worked an issue like this, please share.


r/GraphAPI • • Sep 21 '22

Use GraphAPI to create handwritten notes

2 Upvotes

Good Evening,

I am trying to insert handwritten notes into OneNote pages (specifically OneNote for Windows 10) using the OneNote GraphAPI. Basically i'm looking for a way to insert a set of points or splines depending on how OneNote represents them internally. With handwritten notes being the main feature of OneNote, and images and text begin well supported, i'm sure there is a way to insert notes into pages. So i'm asking you:

  1. Is it possible to insert handwritten notes into OneNote pages via the GraphAPI and if so how exactly does that work?

  2. If its impossible, i'd be very glad to hear about other programmatic ways of inserting handwritten notes aswell (although at first glance it would be extremely odd for such a basic feature to be missing). Is there maybe some way to embed it into HTML and serve it via the clipboard?

Otherwise, the application will have to resort to dragging the mouse pointer using the Windows API which is really error-prone, inefficient and doesn't work on phones.

Thank you in advance and i'm looking forward to your takes,

Erik


r/GraphAPI • • Sep 15 '22

Get incremental changes for groups/users

2 Upvotes

I am synchronizing an Azure AD repository by periodically polling the changes in the repository. https://docs.microsoft.com/en-us/graph/delta-query-groups.

Normally an @odata.nextLink should only appear in the response if more data is expected. Unfortunately this is not the case and I sometimes get up to 50 empty @odata.nextLink responses before the final @odata.deltaLink is received.

What could be the reason for this?


r/GraphAPI • • May 25 '22

Outlook Contact Creation Converting Hashtable Params to Objects?

2 Upvotes

I'm testing out Microsoft Graph API PowerShell to copy Outlook personal contacts from one user to another. My script looks like this:

$contacts = Get-MgUserContact -UserId [email protected] -property * -top 300 | select *

foreach ($user in $contacts) {
$params = @{
GivenName = $contacts.givenname
Surname = $contacts.surname
MobilePhone = $contacts.MobilePhone
Jobtitle = $contacts.JobTitle
CompanyName = $contacts.CompanyName
Categories = $contacts.Categories
NickName = $contacts.NickName
EmailAddresses = @(
@{
Address = $contacts.surname+$contacts.GivenName[0]+'@company.com'
Name = $contacts.displayname
            }
        )
    }
New-MgUserContact -UserId [email protected] -BodyParameter $params
}

For all the attributes like display name or email it converts it to an object: {System.Object[]}

When i do $params.givenname | gm it says that it's a system string, so I'm unsure why it tries making it an object.


r/GraphAPI • • Apr 22 '22

Graph API long-lived tokens.

2 Upvotes

I have a bit of an odd request.

I have an MFT platform that I need to convert mailbox access from basic auth to OAuth2. The problem is, the mailbox resource only takes a token as plain text input, it does not have a way to request tokens on its own. So my backup plan was to request tokens through the Graph API on behalf of the MFT's service account. But as everyone knows, Graph API tokens are short-lived at 3599 seconds (1 hour).

Is it 1) possible to generate a long-lived token (longest interval possible, preferred 1 year) and 2) how would I go about doing that? I've done some reading on changing the access token policy but do not want to make that change tenant-wide.


r/GraphAPI • • Mar 29 '22

Anyone found good examples using the Powershell Module for Graph API of creating a holiday file?

2 Upvotes

I'm more familiar with powershell, so I've starting playing with the PS module for graph API and then following this example, I have created a single calendar event on a test calendar: https://docs.microsoft.com/en-us/graph/api/calendar-post-events?msclkid=bc9d16dfafaa11ec9d6355fdb079060e&view=graph-rest-1.0&tabs=powershell

What I'm trying to learn how to do is to use this method to create a process to add national holidays and paydays to users calendars. I'm getting stuck moving away from the example (a meeting with a specific date/time frame 'start' and 'end' and moving to 'isallday'.... anyone done something like this with a series of unique events?


r/GraphAPI • • Feb 25 '22

Application Authentication/Permissions

2 Upvotes

Hello! I'm trying to develop an application that consumes the calendar API of multiple users and the permission/authentication process confuses me.

The idea is that the users give read/write permissions of their calendars to the system once and from there the backend can make requests without the user intervention.
But I don't fully understand the authentication flow, Graph generates and returns a permission token that the system can save and reuse at anytime? Should I store the refresh_token?

Sorry if the question is confusing, english is not my first language.
Thanks and good weekend.


r/GraphAPI • • Feb 16 '22

Noob to Graph API: Missing Role Permissions?

2 Upvotes

Hey everyone..

I'm a bit over my head here, so want to post and get some direction (if even possible)

I want to make a project that in the end needs the MS TEAMS status of everyone in my group chat (I want to light up some LEDS to match the status color for everyone in the group)

I went to Azure, registered my 'app'I went to Postman to test things out...

MSGraphs > Application > TEAMS > (any of the GET options)

I -think- I have done everything correctly.. so far. if I try any of the example calls (GET....etc) from the left panel.. I seem to get permission errors.

"error": {
        "code": "Forbidden",
        "message": "Missing role permissions on the request. API requires one of 'ChannelSettings.Read.All, Channel.ReadBasic.All, ChannelSettings.ReadWrite.All, Group.Read.All, Directory.Read.All, Group.ReadWrite.All, Directory.ReadWrite.All, ChannelSettings.Read.Group, ChannelSettings.Edit.Group, ChannelSettings.ReadWrite.Group'. Roles on the request ''. Resource specific consent grants on the request ''.",

So while I have been fudging my way through all this (being lost/guessing a bit).. I am completely lost at what to do at this point. My guess is nothing. As this would require my jobs 'admin' to do something on a permission/access level then? Is there ANYTHING that can be done publicly? Or is it me, and I am doing something wrong? Maybe POSTMAN is set up incorrectly? (although I dont think I'd be getting those message/response then)

Can I access -anything-? :)

Any legit direction or suggestions is appreciated.

Thanks


r/GraphAPI • • Feb 04 '22

403 on Invote-WebRequest

2 Upvotes

Good evening everyone,

I am trying to run a PowerShell script that connects to the GraphAPI to get OneDrive users who have shared folders: https://github.com/michevnew/PowerShell/blob/master/Graph_ODFB_shared_files.ps1

I keep getting a 403, but I have the following API permissions set:

  • sites.readwrite.all

  • user.read

  • user.read.all

I know I am missing some kind of permissions based on the error message, but I am not sure what.

Any help is appreciated,

Hyde


r/GraphAPI • • Jan 27 '22

Question regarding Powershell and Microsoft Graph API calls

Thumbnail self.powershell
2 Upvotes

r/GraphAPI • • 28d ago

Does anyone know how to use OneDrive.Provision.All scope?

1 Upvotes

There is a relatively new scope in Graph (or Sharepoint) that seems like it allows user OneDrives provisioning using an API. However, there is no documentation on how to use this.

Does anyone have an idea?


r/GraphAPI • • Oct 26 '26

Raising Graph API bug reports

1 Upvotes

Hi all,

I used to raise Graph bug reports here: https://github.com/OneDrive/onedrive-api-docs/issues however over the years this is now less responsive.

What is the right way to get attention to a Graph API bug?

I have posted the relevant details here:

https://github.com/OneDrive/onedrive-api-docs/issues/1934

Reference:
https://github.com/abraunegg/onedrive/issues/3930 (October 2026)
https://github.com/abraunegg/onedrive/issues/3237 (April 2025)


r/GraphAPI • • Aug 28 '26

What is the Microsoft Graph API replacement for deprecated Recent, SharedWithMe, and Insights APIs?

1 Upvotes

Hi Microsoft Graph community,

I'm currently working on a Microsoft Graph integration that needs to retrieve:

  • Files recently accessed/used by the current user

  • Files shared with the current user

  • Files from OneDrive and SharePoint

I'm currently using the following APIs:

GET /me/drive/recent
GET /me/drive/sharedWithMe
GET /me/insights/used

However, these APIs are deprecated, and some of them will stop returning data after November 2026. (Microsoft Learn)

I'm stuck in development because I haven't been able to identify a Microsoft-supported replacement that provides the same functionality.

Could someone please clarify:

  1. What is the official replacement for /me/drive/recent?

  2. What is the official replacement for /me/drive/sharedWithMe?

  3. What is the official replacement for /me/insights/used?

  4. Is there a single recommended Microsoft Graph API that can provide recently used and shared files across both OneDrive and SharePoint?

I'm specifically looking for the officially supported API/recommended approach, rather than a workaround that may also become deprecated.

Any guidance from Microsoft Graph experts or Microsoft employees would be greatly appreciated.

Thanks!


r/GraphAPI • • Jul 17 '26

Webinar registration API rejects boolean answerInputType questions

1 Upvotes

We're having an issue utilizing the Checkbox (Yes/No) Custom question type in a Webinar when submitting a virtualEventRegistrationQuestionAnswer collection as part of a response body.

Registering for a Teams virtual event webinar via Graph works fine for text, singleChoice, and multiChoice custom registration questions — but any answer to a boolean-type question fails with a generic 400, using application permissions (VirtualEvent.Read.All + VirtualEventRegistration-Anon.ReadWrite.All, client credentials grant).

Anyone else hit this? Is this a known limitation of app-permission registrations, or a bug? Docs list booleanValue as valid for answerInputType: boolean with no caveats.


r/GraphAPI • • Jul 10 '26

The geolocation value does not represent a geographical point. (Inserting List Items with Geolocation field)

Thumbnail reddit.com
1 Upvotes

r/GraphAPI • • Jul 09 '26

Can you create meetings with the shorter URL format, using Graph API?

Thumbnail reddit.com
1 Upvotes

r/GraphAPI • • Jun 29 '26

I am trying to directly open a shared/synced version of a file on my desktop app through my webapp.

1 Upvotes

So, to simplify:
I have files in my sharepoint.
I have a webapp that calls to the sharepoint and displays the filenames to me on my webapp.
I want to open the files to my desktop app without having to download (as a direct file or standalone file) that is already synced to the sharepoint.
I can do this manually: for Office Apps like Word or Excel, I open the browser office > editing > Open in Desktop App.
For other types of files, I can click on the Sharepoint file > Open > Open in App or Edit > Open in App. (So when I make any changes to this file, they are auto synced to Sharepoint and I don't need to download and place it on my local sharepoint for it to sync).

I want to skip the manual steps and directly have it "open in app" or "Open in Desktop App".

Any suggestions or help is appreciated. Thank you.


r/GraphAPI • • Apr 28 '26

Webhook Power Automate Flow Vs .Net 10 WebApi Web Service

1 Upvotes

Hi.

Just wondering if anybody here has implemented a listener for outlook calendar event updates by setting up a subscription with a webhook.

I have tested one where the webhook points to a web service written in .Net 10.

Just wondering if anyone has used a Power Automate Flow instead of a custom web service. Trying to decide which is the best option to implement in production. Cheers


r/GraphAPI • • Apr 21 '26

Setting custom ID on calendar event creation

1 Upvotes

Hi guys,

I am new to Graph API and have a query for you guys.

I am just about to begin writing an integration between CRM and outlook.

Currently we have CRM server side sync enabled which syncs appointments to the users outlook calendar (this works fine).

We are having issues with sending meeting invites however, when additional attendees are added to the appointment post-creation.

In this scenario, only the attendees that were there when the appointment was created are getting email invites.

For this reason, we may to turn off the auto sync and manually create the outlook calendar events instead.

This way we will be able to control the sending of calendar invites and ensure that subsequent attendees get the invites.

Anyhow, as part of coding this, we would like to store down the ID of the CRM appointment record against the outlook calendar event when we are creating the event.

On researching this, I have seen both single value extended properties AND open extensions recommended as approaches to use for storing this id down against the calendar event.

Wondering if anyone here has an opinion on which way to go (or a better alternative approach even).

Appreciate any advice.

Thank you


r/GraphAPI • • Apr 02 '26

Setting Co-Organizers in Teams Meetings

1 Upvotes

Wanting to confirm with others as I don’t see any documentation around this.

I am trying to configure my company’s LMS to use Teams for remote instructor led trainings. I want it to create and manage meetings through Graph API. I have it mostly working but have been running into a little roadblock.

We are using a service account that is configured with an app registration. This creates the meeting using the endpoint /users/{id}/onlineMeetings. I configure course instructors as co-organizers and set lobby bypass for co-organizers. The graph reply confirms it is set correctly and the instructor receives the meeting invite. However, when they go to start the meeting, they are still stuck in the lobby.

The current theory is that co-organizer roles are restricted by any application token created meetings and do not receive full co-organizer permissions until the organizer (the service account in this case) joins and starts the meeting.

The other option seems to be using a delegated token with the /me/onlineMeetings endpoint. Our theory is that using this endpoint would grant co-organizers full permissions from the start.

Just wanting to confirm if our theories are correct or incorrect or if anyone can provide any insight as to a better solution.

Thanks in advance and please let me know if I need to provide any more information.


r/GraphAPI • • Apr 01 '26

Replicate files and folders on an internal application

Thumbnail reddit.com
1 Upvotes

r/GraphAPI • • Mar 30 '26

Graph Endpoint Permission Issues

1 Upvotes

Anyone else having issues with operationApprovalRequests in the Beta endpoint

I'm using this query which works in Graph explorer to return all the Intune Multi Admin Approval Requests using my delegated credentials on my own account with the DeviceManagementConfiguration.Read.All and DeviceManagementRBAC.Read.All scopes granted.

https://graph.microsoft.com/beta/deviceManagement/operationApprovalRequests?`$filter=status eq 'needsApproval'"

I can also use it in my PowerShell script I've created to create notifications for Intune Multi Admin approvals to a teams channel, again using my delegated credentials.

What isn't working is when I try and use either an app registration to run the script or use a managed identity as I want to run this as an Azure Automation.

Both have the same permission scope applied but I keep getting this error when I run my script

{"error":{"code":"UnknownInConvertApiError","message":"{\r\n \"_version\": 3,\r\n \"Message\": \"An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: ************* - Url: https://proxy.msub06.manage.microsoft.com/StatelessRoleAdministrationFEService/deviceManagement/operationApprovalRequests?api-version=5025-09-12&$filter=status+eq+microsoft.management.services.api.operationApprovalRequestStatus%27needsApproval%27\",\r\n \"CustomApiErrorPhrase\": \"\",\r\n \"RetryAfter\": null,\r\n \"ErrorSourceService\": \"\",\r\n \"HttpHeaders\": \"{}\"\r\n}","innerError":{"date":"2026-03-30T09:53:23","request-id":"********","client-request-id":"**********"}}} (Response status code does not indicate success: 403 (Forbidden).)

403 indicates the wrong permissions scopes but I've given both the app registration and the Managed identity the same scopes as I did when I was using my delegated credentials which works just fine.

Where am I going wrong?


r/GraphAPI • • Mar 27 '26

GraphAPI for Purview Data Loss Prevention Policies

1 Upvotes

Hi everyone,

I am looking for the correct Microsoft Graph API endpoint to retrieve policies from Microsoft Purview Data Loss Prevention (DLP).

I previously used the following beta endpoint: GET https://graph.microsoft.com/beta/security/dataLossPrevention/policies

However, this no longer seems to be returning an error. Has this endpoint been deprecated, moved to a different path, or is there a new replacement?

Any guidance or updated documentation links would be greatly appreciated. Thanks!

I did created same question on MS Q/A, just want try my luck here.


r/GraphAPI • • Mar 25 '26

Detecting Meeting Responses - Changes Only Possible?

1 Upvotes

Hi.Hi.

I have a requirement whereby we have 100 odd user outlook mailboxes that we need to track meeting request responses for.

It is only required attendee responses that we are comcerned about.

I have done a small test in setting up a Graph API subscription integrating with a web API web service webhook.

Using this I am able to successfully read the responses on some test calendars.

I think though that these subscriptions (ChangeType="updated") fire off all updates to all of the events in the users calendar, regardless of whether these involve responses.

Is there any way to define it so that it only fires when there is some change to the responses?

Thanks