Microsoft Graph
50 TopicsDifficulty with Auto-Answering VOIP Calls via Microsoft Graph API
Description: I'm working on a PowerShell script to initiate and auto-answer VOIP calls using the Microsoft Graph API. I have successfully set up my Azure App Registration, including a callback URI. However, I'm encountering issues when trying to auto-answer calls Details: Call Initiation: The script successfully initiates a call using the New-MgCommunicationCall endpoint. Call Status: The call transitions from "establishing" to "established" status as expected. Error on Auto-Answer: Upon attempting to auto-answer the call with the Invoke-RestMethod to the answer endpoint, I receive a 404 Not Found error. The output indicates that the call ID is valid, but it seems the call resource is not found at the time of answering. Current Script Setup: I'm using a callback URI (https://kyncomdigiwasusdev.onmicrosoft.com/callback) configured for handling call events. I have ensured the necessary permissions are granted in Azure for the app. I have tried various delays (currently set to 5 seconds) between establishing the call and answering it, but I still receive the 404 error. Questions: Are there any known issues with the auto-answer feature in the Microsoft Graph API for VOIP calls? What additional steps should I take to troubleshoot this error?190Views0likes2CommentsDownloading word file as PDF from SharePoint using graph api looses sensitivity-label
I have a word file in SharePoint Online document library, this file has Sensitivity label assigned to it. I am downloading this file using Graph SDK with query parameter 'format=pdf'. The file is successfully downloaded and saved as pdf, however, the sensitivity labels are lost. Graph url: https://graph.microsoft.com/v1.0/drives/b!blTHg...nEk/root:/test03/document.docx:/content?format=pdf I opened the same file in browser (Open in browser) and clicked on File --> Save as --> Download as PDF; this step retain the sensitivity labels. Why is the file when downloading from API loosing its labels? Note: I tried downloading directly using SharePoint URL and there too Label information is lost. The sensitivity labels does not carry any control mechanisms i.e., they are used for information classification.257Views0likes0CommentsLogin failed while configuring Azure SQL connector
Hello All, I'm trying to play with the Microsoft Graph connectors and trying to set up my first conector. I decided to use the Microsoft Azure SQL connector and went through the guides in Microsoft Learn https://learn.microsoft.com/en-us/microsoftsearch/mssql-connector https://learn.microsoft.com/en-us/microsoftsearch/configure-connector I created an Azure SQL Server and Database, registered the app and even put the app user as admin, I create an external user using the SQL CREATE USER [app name] FROM EXTERNAL PROVIDER and exec sp_addrolemember 'db_datareader', [app name]' Using SQL managment studio I'm able to connect to the SQL but when I try to configure the connector in the admin center I'm stuck on the Database settings screen, after selecting the "Test Connection" button I got the error message: "Error from database server: Login failed for user ''. Incorrect or invalid token." Thanks, Jonathan707Views0likes1CommentSharepoint 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---preview there 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 in RateLimit-Limit header. This makes it even harder to identify the exact cause. Any support related to this is appreciated!!317Views0likes0CommentsMicrosoft Graph API returns no data or unexpected errors for Viva Learning
Hello, I'm exploring options to create a custom learning management system for my company. The first thing I would like to do is to pull data from Microsoft Viva Learning via the Microsoft Graph API, for example to see which courses the employees have completed. The next step will be to write that data on a SharePoint site. I'm using the C# https://developer.microsoft.com/en-us/graph/quick-start example as a base, so I can make use of the Microsoft Graph SDK for C#. This is a .NET 7 project, so I upgraded it to a .NET 8 project with the latest versions of the packages: Azure.Identity version 1.11.2 Microsoft.Graph version 5.49.0 For authentication, I have 2 different clients in my code: ApplicationGraphClient which is using a ClientSecretCredential with a client secret provided by my administrator UserGraphClient which is using an InteractiveBrowserCredential, so that I can log in with my own account The following permissions have been given to the app by the administrator: application permissions User.Read.All LearningAssignedCourse.Read.All LearningContent.ReadWrite.All LearningSelfInitiatedCourse.Read.All Sites.ReadWrite.All delegated user permissions User.Read offline_access LearningAssignedCourse.Read LearningContent.ReadWrite.All LearningSelfInitiatedCourse.Read LearningProvider.ReadWrite Sites.ReadWrite.All According to the docs, it's possible to https://learn.microsoft.com/en-us/graph/api/learningcourseactivity-list?view=graph-rest-1.0&tabs=http#http-request both for the signed-in user, but also for any user by ID. However, in both cases, I'm getting an empty collection as a result, despite the facts that I've completed several courses in Viva Learning. There is no error or exception. in UserGraphClient: await graphClient.Me.EmployeeExperience.LearningCourseActivities.GetAsync(); // returns an empty collection in `ApplicationGraphClient: await graphClient.Users[myUser.Id].EmployeeExperience.LearningCourseActivities.GetAsync(); // returns an empty collection My administrator also made me a knowledge admin, so I have access to the admin tab of Viva Learning in Teams, and I'm able to export the course activity data for my user. The exported Excel file does contain the expected completed courses. I've also tried to get all the learning activities for all the employees, with a top 10 limit, but this fail with an unknown error and code 404, so I suppose it's implemented in the SDK but not supported by the API. In ApplicationGraphClient: await graphClient.EmployeeExperience.LearningCourseActivities.GetAsync(config => { config.QueryParameters.Top = 10; }); Lastly, I've tried to https://learn.microsoft.com/en-us/graph/api/employeeexperience-list-learningproviders?view=graph-rest-1.0&tabs=http#http-request using both the UserGraphClient and ApplicationGraphClient, and in both cases I get the error message "Insufficient privileges to complete the operation.". As you could see above, I do have the delegated LearningProvider.ReadWrite permission, so it should at least work for my signed-in user. Thank you in advance for your help.454Views0likes0CommentsUnable 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-MgGraph229Views0likes0CommentsNew Profile Card Customization through Microsoft Graph Beta
People are the heart and soul of your company, but finding the right people at the right time isn’t always easy. Sometimes you’re looking for more than just a name and face, maybe it’s a skill, location, or something else. In Office 365 when you select someone’s name or picture in Outlook or other Office apps and services, you can find information related to them on their profile card. To see a profile card in Outlook mobile, tap a person's picture or name. To see the profile card in other apps, hover or click the person's photo or name. To see your own profile card, select your own profile picture or name. The profile card is also sometimes referred to as a contact card or people card. Here's an example of the card in Outlook on the web: However, profile cards are limited in the amount of information they display. Perhaps you want to include custom properties related to your company or a person’s role to help people find the right person or expertise. Today we’re pleased to announce we’ll be adding the ability to add custom information to a person’s profile card through the Microsoft Graph Beta. This allows an administrator to customize people’s profile cards by adding properties according to your business needs. The new Beta experience will provide a simple way to supplement a person’s profile card via the Microsoft Graph. For example, as illustrated below, you may want to add a custom property to the profile card, such as a person’s Cost Center or Employee Id. Figure 1 Profile view where more contact info is displayed In this example, you can see the standard profile card before it has been expanded. Using new this new customization option, you’ll be able to easily display important information such as a person’s Cost Center or Employee Id as illustrated below in the expanded profile view. Figure 2 Profile with all contact info displayed in addition to custom attributes Wrapping Up This new Beta experience will become available in Spring 2020 – keep an eye out for availability by bookmarking this article or by following @OfficeDev and @MicrosoftSearch on Twitter. Roadmap Id 6150235KViews28likes21Comments