r/GraphAPI • • Jun 06 '24

I can't seem to get permissions to scope when connecting to graph through an app

3 Upvotes

I registered a new app, applied the "User.ReadWrite.All" permission as an application permission, created a self-signed certificate, uploaded it, used the thumbprint to connect and it all LOOKS fine. Even running

(Get-MgContext).Scopes

yields the "User.ReadWrite.All" as if I have the permissions with this session. But when I run any Update-MgUser command I get access denied. Can someone smarter than me help?

Edit: Ok, I realized I'm trying to modify the phone attributes of users and getting denied, but I can apply other attributes like job title. Anyone know what I need to do to allow an application to modify non-admin mobile phone attributes?


r/GraphAPI • • Sep 13 '23

On-Demand appointment via Bookings

3 Upvotes

I've successfully been able to create new scheduled appointments via the Microsoft Bookings API in Microsoft Graph, and when I look at my Virtual Appointments queue I see them in the "Scheduled" section.

However, I need to be able to create On-demand appointments as well. So far I haven't been able to discover the right way to do that. I can create a meeting via the onlineMeeting API, but that doesn't actually put anything into the On-demand queue.

What am I missing here? What is the proper way to create an On-demand appointment? I don't think it can be done via the Bookings API.


r/GraphAPI • • May 30 '23

Retrieve Non-Useable Authentication methods through MSGraph Powershell

3 Upvotes

Hello,

We are in the middle of a MFA rollout and as expected some users are not following the Authenticator workflow correctly, which results in "Non-usable authentications methods" in their AzureAD account.
To be more reactive in such cases, we'd like to retrieve this information directly from AzureAD through MsGraph, but it seems the information isn't available in the get-mguserauthenticationmethod cmdlet: there is no distinction between useable and non-useable methods.
is there a way to retrieve the Auth method status somewhere else?


r/GraphAPI • • Apr 17 '23

Exporting Bitlocker keys from AAD - Help!

3 Upvotes

Hello! I'm trying to use the Get-MgInformationProtectionBitlockerRecoveryKey cmdlet or the https://graph.microsoft.com/v1.0/informationProtection/bitlocker/recoveryKeys/ API call to pull bitlocker keys for batches of devices.

No matter how I authenticate (app with cert, secret, as myself, as a test account, etc.) I'm unable to pull the keys - I'm hit with:

Welcome To Microsoft Graph!
Failed to authorize, token doesn't have the required permissions.

Everything has the appropriate permissions (Read users/devices, BitLockerKey.Read.All, and security reader role).

Has anyone had any success with exporting these keys from AAD? How did you authenticate?


r/GraphAPI • • Apr 07 '23

OneDrive - Change Ownership - Grant-MgDriveRootPermissions

3 Upvotes

Hello there.

Trying to change the ownership of a OneDrive root folder, in a scenario where a person leaves the organisation. Utilising the PowerShell Graph SDK - Microsoft.Graph.Files namespace.

The cmdlet Grant-MgDriveRootPermissions - Ref here - feels like it should do what I need. However I can't seem to form the -recipients parameter correctly.

I'm not quite sure what a IMicrosoftGraphDriveRecipient is and how I form the syntax to pass into the -recipients.

Would anybody be able to point me in the right direction pleas.e

Thank you


r/GraphAPI • • Apr 05 '23

Azure app registration with user consent

3 Upvotes

Today I have an single-tenant Azure App registration / Enterprise app setup with admin consent in my customers AD which gives me permission to get data (calendar events) from all users in the AD.

What I'd like is to have a multi-tenant app in my own AD and then give relevant customer users the option to subscribe to the AD-app, so that I can get data from only the users that consent.

Can anyone guide me in the right direction? Maybe a tutorial that shows both the AD-app settings and C# code examples.

Thanks.


r/GraphAPI • • Mar 19 '23

MS Graph get all user's mailbox forwarding rules in 1 request

Thumbnail self.microsoft365
3 Upvotes

r/GraphAPI • • Mar 13 '23

Teams Clone call increased time (30 min)

3 Upvotes

Hi,

I'm using the Graph API and the Clone call ( /teams/{id}/clone ) in a flow when provisioning new teams. Up until recently (last Februrary) that call was quick in the transition from state "notStarted" to "succeeded" however now I can see this to be 30 minutes. Looking at my flow runs from before the execution time was 3-5 minutes and today its 30-40 minutes.

My Flow is built on the idea from this post with some modifications where I for example are waiting on the team request state to be "succeeded" or "failed" and not "running" as they have in the post.

I have also tried to clone a team using the Microsoft.Graph.Teams PowerShell module with a similar delay of 30 min (from when the command is run until I get notified that I have been added to a new team).

Anyone else noticing this and ideas on way forward?


r/GraphAPI • • Mar 10 '23

GraphAPI and OneNote Endpoint

3 Upvotes

I am having issues with this one here:

https://graph.microsoft.com/{version}/sites/{id}/onenote/{notebooks | sections | sectionGroups | pages}

When sending a GET request to https://graph.microsoft.com/v1.0/sites/{id}/onenote/notebooks it returns a

The OData query is invalid. The URI segment 'notebooks' is invalid after the segment 'notes'.  

I aslo verified the same issue with Powershell Graph API using:

Connect-MgGraph -Scopes "Notes.Read.All", "Sites.Read.All"
Get-MgSiteOnenoteNotebook -SiteId $Site.Id

Error: Get-MgSiteOnenoteNotebook : The OData query is invalid. The URI segment 'notebooks' is invalid after the segment 
'notes'.

Where can I report the bug, if it is one. Can anyone help by verifying for me?


r/GraphAPI • • Feb 10 '23

Get-MgUser SignInActivity not working

3 Upvotes

Hi Reddit,

I'm trying to get last sign in date for all users in a tenant but I'm having some problems doing this with PowerShell.

Using latest PowerShell 7.3.2 and the Microsoft.Graph.Users 1.21.0 module. PowerShell returns a bunch of empty results, shown in image 1. Commands I'm running:

Connect-MgGraph -Scopes "User.Read.All","AuditLog.Read.All"
Select-MgProfile -Name "beta"
Get-MgUser -UserId "<upn>" | select -ExpandProperty SignInActivity

On the Graph Explorer site I can get this data for all users when logged in with the same account and granting the same permissions.

I also see some examples on the internet using Get-MgUser -UserId "<upn>" -Property SignInActivity but when I try this (and switch to using the account id, not upn) it doesn't display this property at all. Shown in image 2.

What am I doing wrong?

Thanks!


r/GraphAPI • • Jan 25 '23

MS Graph API permissions

3 Upvotes

I am guessing this group is full of MS Graph experts so I will ask here. Since this is specifically about Graph API permissions.

I am seeing various questions while study for MS-100 with answer choices that have graph permissions like organization.read.all and directory.read.all. I understand that Directory is at a higher level than organization but I am having a hard time finding something/documentation that actually helps me know exactly what an organization vs a directory is. Like real world examples of what each are within the same company. Any help would be greatly appreciated.


r/GraphAPI • • Dec 16 '22

Is it possible to create Appointments?

3 Upvotes

Update: Thank you ChatGBT! To create an appointment using the New-MgUserEvent cmdlet, you can set the -IsOnlineMeeting parameter to $false. This will create a normal appointment, rather than a meeting that involves inviting other attendees. If you also specify any attendees in your event parameters, this will override and create as a meeting.

TL;DR - I've created a script to generate a few hundred Appointments, only to then find out my events are being created as Meetings and not Appointments. I need simple appointments, no attendees.

Hi All,

I have a yearly task to generate a calendar with daily events for our staff and to date, I've manually created these events and modified them year to year for minor changes. I have been recently exploring the Graph PowerShell module that seems to be absorbing every other module and figured now is the time to start migrating my scripts to use these new cmdlets. I stumbled on New-MgUserEvent and thought I was set...

When I pull existing events, I can get both Meetings and Appointments, but reviewing the properties returned for each, I cannot find anything indicating one is a meeting and one is an appointment. Maybe the Graph Powershell modules don't support this, but does Graph API?


r/GraphAPI • • Nov 28 '22

Graph SDK - new-mggroup -owners issues.

3 Upvotes

having trouble with setting the owners parameter when using new-mggroup -owners. I have tried using UPN and Object ID. i am currently trying different iterations of the below code. (user id is sanitized)

provides error 1 $Owner = (Get-MgUser -UserId '[email protected]').id $GroupOwner = "https://graph.microsoft.com/v1.0/users/" + $Owner

provides error 2 $temp = (Get-MgUser -UserId '[email protected]') $GroupOwner = $temp.Values

$GroupParameters = @{ DisplayName = "GraphTest" Description = "Graph SDK for Powershell test " GroupTypes = "Unified" MailNickname = "GraphTest" SecurityEnabled = $true MailEnabled = $false MembershipRuleProcessingState = "On" Visibility = "private" owners = $GroupOwner }

New-MgGroup @GroupParameters

error 1 Cannot process argument transformation on parameter 'Owners'. Cannot convert value "System.Collections.Generic.Dictionary`2+ValueCollection[System.String,System.Object]" to type "Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]". Error: "Cannot convert the "https://graph.microsoft.com/v1.0/$metadata#users/$entity" value of type "System.String" to type "Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject"."

error 2 New-MgGroup_CreateExpanded: The context URL 'https://graph.microsoft.com/v1.0/$metadata#users/$entity' is invalid.


r/GraphAPI • • Oct 13 '22

Unified Group Create / Modify - SMTP Address (PowerShell)

3 Upvotes

Hello - I am creating some powershell scripts for my company to automate the creation of some Microsoft 365 "Unified" Groups. I have no issues creating the group through powershell, but I need to modify the SMTP address to be on a subdomain already registered within our Microsoft Tenant. I see the Mail and ProxyAddress fields are read only fields.... Is there a way with Graph API to modify the email address or add a new one through powershell?

For reference, I am using the New-MgGroup, and I also tried the Update-MgGroup commands. Thanks in advance for any help!


r/GraphAPI • • Oct 02 '22

Delegated or application permissions for cron jobs

3 Upvotes

Hi! I'm building a marketing automation tool that uses the Graph API to send automated emails on behalf of our users. Essentially, a user signs up using the Sign up and sign in user flow provided by Azure AD B2C. Then we're using a cron job to trigger a function on our server every minute. This function loops through all of our user's email sequences, and when an email is ready to be sent, sends an email on a user's behalf.

Should I be using the delegated permissions or application permissions (Daemon app) for this use case? My intuition tells me delegated, but in that case our app would have to create a different Graph Client for each user we need to send an email on behalf of, like so:

sequences.forEach(sequence => {
  const graphClient = Client.init({
    authProvider: (done) =>
      done(
        null,
        sequence.user.accessToken
      ),
  });

  sequence.contacts.forEach(sequenceContact => {
    // Send an email to a sequence contact on the user's behalf using the graphClient
  })
})

Here's a link to the Stack Overflow question I've created


r/GraphAPI • • Apr 20 '22

Request Limit per Authentication?

3 Upvotes

I am using GraphAPI to export planner tasks into an excel sheet. After i authenticate it exports the first 20 tasks without issue. After that it wants me to authenticate for each additional task. I could only find limits of requests per second or amount of data per request, but not a limit of overall requests per authentication


r/GraphAPI • • Feb 09 '22

A chance to talk with the Microsoft Identity Team for Azure AD Graph API decom

3 Upvotes

I thought this would be helpful for folks to listen in on and ask any questions to the people who work in the space.

It is hosted on Twitter and is open to the public.

https://twitter.com/markmorow/status/1490804531222827008?s=21


r/GraphAPI • • Jan 24 '22

r/GraphAPI Lounge

3 Upvotes

A place for members of r/GraphAPI to chat with each other


r/GraphAPI • • 26d ago

I got a problem O365 microsoft

2 Upvotes

So basically, Microsoft graph rest API 1.0 provide the graph file meta data and in the audit.SharePoint provide the IP address of file changes. Suppose that there is an rename of a file I would get the IP address from the audit.SharePoint and the file data from Microsoft graph rest API, but I want to merge that to and provide a single response, but there is no common ID between them so I am stuck


r/GraphAPI • • Mar 11 '26

Graph Explorer down?

2 Upvotes

r/GraphAPI • • Jan 17 '26

Insufficient developer role - meta graph api

2 Upvotes

We are also facing an issue that started around 2 days ago, even though everything was working correctly before.

Problem:

When trying to connect an Instagram account, we receive the error:

“Insufficient developer role”

Current status:

Our app has Advanced Access approved for:

instagram_business_basic

instagram_business_manage_insights

The Meta Developer Dashboard shows everything as green (no warnings or pending reviews)

We are able to successfully use instagram_business_manage_insights

The issue occurs only with instagram_business_basic, specifically while connecting the Instagram account

This issue appeared suddenly without any changes on our side.

Could you please help us understand:

Why this error is occurring despite having Advanced Access?

Please can anyone help


r/GraphAPI • • Jan 06 '26

WhatsApp Cloud API phone number stuck as unregistered despite full approval (business, app, permissions)

Thumbnail reddit.com
2 Upvotes

r/GraphAPI • • Oct 03 '25

How to connect ChatGPT with SharePoint/Teams without giving full tenant-wide access?

Thumbnail reddit.com
2 Upvotes

r/GraphAPI • • Sep 22 '25

Are these user attributes available? info,wWWHomePage,PostOfficeBox

2 Upvotes

Hi,

we try to also query these three user attributes, which are available in Active Directory, but cant find them via Graph API.

info
wWWHomePage
PostOfficeBox

Thanks for any hint