"Graph API"
9 TopicsCorrelation between Microsoft Graph Events and bookingBusiness Appointments
Hi everyone, I'm struggling with getting complete attendee information from calendar events. I can successfully get event details from the /events endpoint, but it lacks full attendee information and other details compared to the bookingBusiness/account-id/appointments endpoint. The problem is, I can't find a way to correlate and event and its various ID's and a booking appointment ID. Is there a recommended way to get full attendee details while working with calendar events? Any help would be appreciated!31Views0likes0CommentsGraph API permission issue to update Office 365 group settings via Application user(ClientId/Secret)
Hello Everyone, I'm facing an issue updating the allowExternalSenders setting for a Microsoft 365 Group. I've tried various methods, including granting permissions of App to Groups and Directories, adding an App role, in the App and even assigning my App to the Azure Global Admin Security role, but nothing seems to be working. Does anyone have any suggestions or solutions for this problem? below is the error. Failed to update group settings: {"error":{"code":"ErrorGroupsAccessDenied","message":"User does not have permissions to execute this action.299Views0likes4CommentsSend adaptive card via Graph Mail
Dear community A third-party monitoring application creates static adaptive cards when an alert is triggered. This application calls a PowerShell script and provides a couple parameters including the adaptive card json. I have now tried to pack this adaptive card into a html email and send it via Graph API. Sadly I cannot get it to render the adaptive card for example in Outlook. HTML message <html> <head> <metahttp-equiv="Content-Type"content="text /html;charset=utf-8"> <scripttype='application /adaptivecard+json'> {"type":"AdaptiveCard","version":"1.4","hideOriginalBody":true,"body":[{...}]} </script> </head> <body> </body> </html> Graph Mail $emailRecipients = @( 'email address removed for privacy reasons' ) [array]$toRecipients = ConvertTo-IMicrosoftGraphRecipient -SmtpAddresses $emailRecipients $emailSender = 'email address removed for privacy reasons' $emailSubject = "Sample Email AdaptiveCard" $emailBody = @{ ContentType = 'html' Content = Get-Content -Path 'C:\...\adaptivecard.html' } $body += @{subject = $emailSubject} $body += @{toRecipients = $toRecipients} $body += @{body = $emailBody} $bodyParameter += @{'message' = $body} $bodyParameter += @{'saveToSentItems' = $false} Send-MgUserMail -UserId $emailSender -BodyParameter $bodyParameter I am grateful for any advice or help with this problem. Many thanks Simon142Views0likes0CommentsListing groups members
Hi there, Im using Perl LWP to get some information on groups: owners and members. The strange thing is that listing owners works without any problem, getting the users gives me a return code 200 but with empty content... no users. While I know the group does in fact have members. The URL I use is like: https://graph.microsoft.com/v1.0/groups/<some_id>/members/?$select=id,displayName,userPrincipalName&$count=true - I added the $count and set consistencylevel to eventual (just in case). - Almost the same URL (owners instead of members) does work. - Running the same URL in Graph explorer does in fact return the members - As far as I can see the permission for members is the same as for owners Kindof at a loss at the moment. Can you help? PeterSolved488Views0likes1CommentSharepoint Delta API 429 error due to unknow reasons
Hi All, We are getting 429 rate-limited responses from Graph API when fetching SharePoint via Delta APIs. The rate limited requests don’t resolve even after waiting for specified time and retrying for 3 times, so such requests fail causing data losses. If we are sending more requests than the allowed rate limit, we will get that reason in headers, but here no such reason is given which suggests that we don’t exceed rate limits and its some other unknown issue. As mentioned in the document highlighted in the this link; https://learn.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online#ratelimit-headers---previewthere could be other reasons that could lead to rate limits. We make sure that we don't request the calls that exceed the count mentioned inRateLimit-Limit header. This makes it even harder to identify the exact cause. Any support related to this is appreciated!!228Views0likes0CommentsUnable to delete Archived users from Viva Engage/yammer using powershell script
I want to delete Archived users who are there in VivaEnage/Yammer. I'm able to export the list but not able to delete users. Probably, some issues with this uri: $uri = "https://graph.microsoft.com/v1.0/yammer/users/$userId" Please suggest, what should I do. I have created this script, but getting this error in csv: Failed to remove:Response status code does not indicate success: BadRequest (Bad Request). Script: Set-ExecutionPolicy RemoteSigned $cred = Import-CliXml -Path 'C:\Script\Vaut\cred2.xml' $cert_graph = Get-ChildItem Cert:\LocalMachine\My\49054ea0593c0920e42b99fe99e9892833e651ec $appid_graph="MY_APPID_GRAPH" $tenantid="MY_TENANT_ID" $certid="MY_CERT_ID" $appid="MY_APP_ID" Connect-MgGraph -ClientID $appid_graph -TenantId $tenantid -Certificate $cert_graph # Fetch users whose display name contains "Archive" $users = Get-MgUser -Filter "startswith(displayName, 'Archive')" -All # Initialize a list to store operation results $results = @() # Loop through each user and remove from Viva Engage foreach ($user in $users) { $userId = $user.Id # Attempt to remove the user from Viva Engage (assuming correct API endpoint) try { # API endpoint might need modification based on exact requirements $uri = "https://graph.microsoft.com/v1.0/yammer/users/$userId" Invoke-MgGraphRequest -Method DELETE -Uri $uri $results += [PSCustomObject]@{ UserId = $userId UserPrincipalName = $user.UserPrincipalName Status = "Removed" } } catch { $errorDetails = $_.Exception.Message $results += [PSCustomObject]@{ UserId = $userId UserPrincipalName = $user.UserPrincipalName Status = "Failed to remove" ErrorDetails = $errorDetails # Add this line to record the error details } } } # Export results to CSV $results | Export-Csv -Path "C:\UserRemovalResults.csv" -NoTypeInformation # Disconnect the session Disconnect-MgGraph186Views0likes0CommentsCreate AD group with owners and members with python graph SDK
from msgraph import GraphServiceClient from msgraph.generated.models.group import Group graph_client = GraphServiceClient(credentials, scopes) request_body = Group( description = "Group with designated owner and members", display_name = "Operations group", group_types = [ ], mail_enabled = False, mail_nickname = "operations2019", security_enabled = True, additional_data = { "owners@odata_bind" : [ "https://graph.microsoft.com/v1.0/users/26be1845-4119-4801-a799-aea79d09f1a2", ], "members@odata_bind" : [ "https://graph.microsoft.com/v1.0/users/ff7cb387-6688-423c-8188-3da9532a73cc", "https://graph.microsoft.com/v1.0/users/69456242-0067-49d3-ba96-9de6f2728e14", ], } ) result = await graph_client.groups.post(request_body) Im following this example to create Azure AD security group with owners and members, But the group is created without the members and additional owners provided. Im following the below doc: https://learn.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0&tabs=python#example-2-create-a-group-with-owners-and-members The Group object has members and owners parameter, should that be used instead? If so is there any example for that?618Views0likes0CommentsMail: Problems Get MIME content of a message
Hello, I wrote a program in Java that monitors an inbox and retrieves new incoming emails and, after successful processing, moves them to a Processed folder. For a few emails, retrieving the MIME content of a message fails and they are moved to an error directory. If I move the emails back to the inbox by hand/in Outlook, they are processed normally. If I move them programmatically or via a Prower Automate flow, the problem remains and they cannot be processed. Ideas? Error: java.util.concurrent.ExecutionException: java.nio.charset.MalformedInputException: Input length = 1 at org.apache.hc.core5.concurrent.BasicFuture.getResult(BasicFuture.java:72) at org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:85)308Views0likes0Comments