Recent Discussions
get SharePoint site items ID
I'm trying to extract all SharePoint News articles from my tenant. I'm almost there but struggling with the last step. My initial graph call is this; It returns all the news posts in a site https://graph.microsoft.com/beta/sites/{SiteID}/pages/microsoft.graph.sitePage?$filter=createdDateTime gt 2025-01-01T00:00:00.0000000Z and promotionKind eq 'newsPost' but there is no way of identifying if a post is published from that call, So I need to do a second call https://graph.microsoft.com/v1.0/sites/{SiteID}/lists/{ListID}/items/{ItemID}/?expand=fields($select=*,FirstPublishedDate) this expands a field 'FirstPublishedDate'. If it doesn't exist, the article has never been published. My problem is I dont get the {ItemID} from the first call. this is the Id visible in the sharepoint list, e.g. 1,2,3 etc. not a GUID. the output of my first graph call looks like this. How can I get the list item ID? "value": [ { "@odata.etag": "\"{404E5AC9-E35D-4895-8E89-E10BBA93B522},25\"", "createdDateTime": "2024-12-16T15:37:08Z", "description": "Hello everyone…", "eTag": "\"{404E5AC9-E35D-4895-8E89-E10BBA93B522},25\"", "id": "404e5ac9-e35d-4895-8e89-e10bba93b522", "lastModifiedDateTime": "2024-12-16T15:43:50Z", "name": "News-Article(4).aspx", "webUrl": "https://company.sharepoint.com/functions/comms/SitePages/News-Article(4).aspx", "title": "Merry Christmas - A message from ", "pageLayout": "article", "promotionKind": "newsPost", "showComments": true,17Views0likes0CommentsMS Graph Create bookingCustomQuestion
Hi This is pertaining to the use of Ms Graph for Ms Bookings custom questions. The current option to add radio button (drop down) list of values is cap to 50 options. Sample query https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/email address removed for privacy reasons/customQuestions { "@odata.type": "#microsoft.graph.bookingCustomQuestion", "displayName": "Test", "answerInputType": "radioButton", "answerOptions": [ list of more than 700 entry] } { "error": { "code": "BadRequest", "message": "Cannot create drop down question with more than 50 options.", "innerError": { "date": "2025-02-07T02:37:41", "request-id": "5bf1adb2-123445-421c-a557-76abb2634043", "client-request-id": "332323246b3f-bc32323-b0dd-489f-4f9f81e263d7" } } } Is there anyway I can add more than 700 option? Also, can the dropdown be sorted ascending . (Right now its sorted by the date and time they were entered first). Greatly appreciate your kind advise. Thank you. David14Views0likes0CommentsIssue Tracking Customer Declining/Cancelling a Microsoft Bookings Appointment via Email Client
Hi everyone, I’m using the Microsoft Graph API to create bookingBusiness calendars and allow customers to book appointments. When an appointment is created, a confirmation email is sent to the customer, and I save it in my database. However, when a customer declines or cancels the appointment by responding to the "Yes", "Maybe", or "No" options in the email, I don’t receive any notifications of this change. I need a way to track this status change to update the appointment in my database. Is there a way to track when a customer declines or cancels an appointment? Thank you for your help!15Views0likes0CommentsApprovals Not updating
I'm having a problem when retrieving the approvals created. Until 2024-12-26 at 13:16:48 UTC, when I created an approval, either through the application or through the API, it immediately appeared when I used get in the endpoint: https://graph.microsoft.com/beta/solutions/approval/approvalItems. Now I'm only able to see the approvals from before 2024-12-26 at 13:16:48 UTC, there is no record of the new approvals. I also noticed that, in the application, it's not showing the name of the person to whom the approval request was sent, only the name of the person who approved it, both for the new requests and for the old requests that have already been completed.16Views0likes0CommentsAuthentication issue while using Client Credential through Oauth2.0
Hi Community Hope you are doing well. I am unable to authenticate to our registered app in azure. I am looking to test the get/users graph api using insomnia (similar tool as postman). During Token generation we are getting 401 error. we are provide correct Client ID and Secret with right scope url. I created the app, added the necessary permissions and the client credentials. Do I need to add a redirect uri to the app? Does the app need to be registered account types as "accounts in any organization directory"? I am getting a 401 unauthorized error Can you please assist what I'm what is missing here? I will really do appreciate your help. Thanks Vatan21Views0likes0Comments- 13Views0likes0Comments
No results coming back from search in SharePoint Online
I have a client with a SharePoint communication site that is used as a document repository where the search results are bringing back nothing. There are 1.8 million files in the library. It has been almost a month since the files were migrated to SPO. We tried a query using the SharePoint Search Query Tool which brings back results, but doing a search on the library or the site brings back zero results. How do I troubleshoot this situation? I have already checked to be sure that the appropriate columns are being indexed and have been since the files were added last month. I don't want to reindex the library if I can help it since there are so many files in there. Is there anything I can do other than have my client submit a Microsoft support ticket?70Views0likes4CommentsMissing Answer Analytics
Hi there I am wondering if anyone else has lost their Answer Analytics in the Search and Intelligence center. Mine have been missing since August, ticket opened with Microsoft but no answers have been given. Is anyone else having this same issue? I would like to be able to understand how my bookmarks are performing but I have no other way to measure this that I know of. Any suggestions?8Views0likes0CommentsDid /me/drive/special/photos/delta?expand=thumbnails just stop working in Graph?
For 2 years, I have been using the endpoint https://graph.microsoft.com/v1.0/me/drive/special/photos/delta?expand=thumbnails to sync the latest photos from special OneDrivephotos folder including thumbnails. 3 days ago, suddenly started getting a 400 error on the URL. So if I remove the expander, the endpoint works but now location:{} is empty too. So did I miss a notification that features going away? Or is Graph seeing some issues right now? You can also reproduce in Graph Explorer with personal OneDrive. Any one else seeing this behavior?5Views0likes0Comments"sites?$search=*" only returns 400 sites
Hi All I am trying to get a list of all sites, but , for some reason, "https://graph.microsoft.com/v1.0/sites?$search=*" only returns 400 items, although we do have almost 2000 sites in our tenant Also, when I am searching sites with "https://graph.microsoft.com/v1.0/sites?$search=SiteName" - it doesnt always find those sites. Anything I am missing here? Thanks12Views0likes0CommentsSharepoint Lists: Format for POST Request to create Column as Choice with Multi Select Enabled
I am relatively new in using the Graph API. I am working on a script that creates new columns for an existing List on my company's SharePoint site. I am having trouble in creating a Choice Field Column that has Multiple Selection Enabled. I followed the documentation to create a Choice Field with the default (single select) as follows: const apiUrl = `https://graph.microsoft.com/v1.0/sites/${siteId}/lists/${listId}/columns`; const response = await fetch(apiUrl, { method: "POST", headers: { Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json", }, body: JSON.stringify(columnPayload), }); Where, columnPayload looks like the following: { "name": "Color", "choice": { "choices": ["Red", "Green", "Blue", "Purple"], "displayAs": "dropDownMenu" } } As expected I see the column created properly.... (Split bottom photo for cleaner view) Now, what changes must I make to have the Allow Multiple Selections toggle enabled when creating the column via the POST request. As we can see, by default, it is not enabled. I have looked over the documentation and have yet to come across anything that provides a solution. I assumed there would be additional fields within the "choice" field in the JSON body to specify this, however, I only see the following on the graph api site: I would appreciate any guidance on this.27Views0likes0CommentsMicrosoft Graph API for search suggestion
Is there any API to get search suggestion for Microsoft search? I see an API call to https://substrate.office.com/search/api/v1/suggestions?query=contos through default Microsoft Search box which returns suggested Files, Sites, People etc. What is equivalent MS search graph API call to get this suggestion ? I need to build custom search box with query suggestion like one below. I checked PnP modern search box webpart configured with Microsoft Search but it not returning any suggestion, any help there?31Views0likes0CommentsFacing issue for Outlook calendar Sync with PHP
When using Microsoft Graph Explorer, and making request, it’s returning the events data correctly. But when in code we generate access token, it’s not able to make request and there is some permission issue, So, the access token we are generating through code as per the official Microsoft documentation, isn’t having the required permission, even though we are specifying the required permission array as scope when making request for access token. Below is the code, I am using public function authorize() { $auth_url = $this->Microsoft_calendar_model->createAuthUrl(); redirect($auth_url); } public function createAuthUrl() { $authorize_url = "{$this->auth_base_url}/{$this->tenant_id}/oauth2/v2.0/authorize"; $queryParams = http_build_query([ 'client_id' => $this->client_id, 'response_type' => 'code', 'redirect_uri' => $this->redirect_uri, 'scope' => implode(' ', $this->scopes), 'response_mode' => 'query', 'prompt' => 'consent' ]); return "{$authorize_url}?{$queryParams}"; } // User is getting prompt for permission consent and even though accepting all permissions isn't working public function callback() { $code = $this->input->get('code'); // I am getting the code here. $access_token = $this->microsoft_calendar_model->fetchAccessTokenWithAuthCode($code); } Issue occurs in the below function public function fetchAccessTokenWithAuthCode($code) { $token_url = "{$this->auth_base_url}/{$this->tenant_id}/oauth2/v2.0/token"; $client = new \GuzzleHttp\Client(); $response = $client->post($token_url, [ 'headers' => [ 'Content-Type' => 'application/x-www-form-urlencoded' ], 'form_params' => [ 'client_id' => $this->client_id, 'client_secret' => $this->client_secret_value, 'redirect_uri' => $this->redirect_uri, 'code' => $code, 'grant_type' => 'authorization_code', 'scope' => 'offline_access Calendars.ReadWrite' ] ]); $tokenData = json_decode($response->getBody()->getContents(), true); $tokenContext = new AuthorizationCodeContext( $this->tenant_id, $this->client_id, $this->client_secret_value, $tokenData['access_token'], $this->redirect_uri ); $graphClient = new GraphServiceClient($tokenContext, $this->scopes); $events = $graphClient->me()->calendars()->byCalendarId('primary')->events()->get()->wait(); pre($events); } What I'm doing wrong, I can't figure it out anywhere?40Views0likes0CommentsDoes MsGraph v5.61.0 and SharePoint have a bug?
Hello. It allows searching for folders in the "root" of a library using "tolower(Name) eq" but it does not allow the same in subfolders. I attach the method where I detected the problem. public async Task<string?> FolderExistsAsync(string listDriveId, string? folderParentDriveId, string subfolderName) { try { if (folderParentDriveId == null) // root { // Ok (best solution, search in server-SharePoint) DriveItemCollectionResponse? folderSearch = await _graphClient.Drives[listDriveId] .Items .GetAsync(q => q.QueryParameters.Filter = $"tolower(Name) eq '{subfolderName.ToLower()}'"); return folderSearch?.Value?[0]?.Id; } else { // Ok (bad solution, search in client) DriveItemCollectionResponse? childrens = await _graphClient.Drives[listDriveId].Items[folderParentDriveId].Children.GetAsync(); DriveItem? subfolder = childrens?.Value? .FirstOrDefault(item => item.Name?.Equals(subfolderName, StringComparison.OrdinalIgnoreCase) == true && item.Folder != null); return subfolder?.Id; //// Err: in Ms Graph v5.61.0?. ////var debugAux = await _graphClient.Drives[listDriveId].Items[folderParentDriveId].Children.GetAsync(); // Ok //DriveItemCollectionResponse? childrens = await _graphClient.Drives[listDriveId].Items[folderParentDriveId].Children // .GetAsync(q => q.QueryParameters.Filter = $"tolower(Name) eq '{subfolderName.ToLower()}'"); // Err: Microsoft.Graph.Models.ODataErrors.ODataError: 'Item not found' //return childrens?.Value?.FirstOrDefault()?.Id; } } catch { } return null; } Thanks.22Views0likes0Comments500 Internal Server Error when trying to access the Microsoft Graph API for Viva Engage
I am experiencing an issue when trying to access the Microsoft Graph API for Viva Engage: https://learn.microsoft.com/en-us/graph/api/resources/community?view=graph-rest-1.0 Every time I make an API request, I receive a 500 Internal Server Error response. Here are the steps I have taken so far: Created an App Registration in Azure AD. Assigned the Community.ReadWrite.All permission as per the documentation. Ensured that the token we are using includes the correct and valid permissions. Despite completing these steps, the error persists. Below is a screenshot of the error encountered when testing the API using Postman: Are there any steps I might have missed, or is the API currently experiencing issues?95Views0likes0CommentsProblem when sending out the invitation
I'm facing an issue where the invitation isn't being sent to the recipient, even though the API request runs successfully. I followed the tutorial in the link below, but the response I received is slightly different. https://learn.microsoft.com/en-us/graph/api/driveitem-invite?view=graph-rest-beta&tabs=http It has the Invitation in the return response My response result doesn't have the invitation. As result I did no receive any invitation email. Anyone can help me this?48Views0likes0CommentsProblem copying file in SharePoint with Ms Graph v5.x
Hello. I need to copy a file in SharePoint, with Ms Graph v5.61 to a new folder (in the same library). The problem is that it copies but the process does not wait for it to complete and returns null, then I check and the file exists. I pass the code that I am using. public async Task<string?> CopyAsync(string listDriveId, string sourceDriveId, string destinationDriveId, string newName) { try { GraphSDK.Drives.Item.Items.Item.Copy.CopyPostRequestBody destinationInfo = new GraphSDK.Drives.Item.Items.Item.Copy.CopyPostRequestBody() { ParentReference = new ItemReference() { DriveId = listDriveId, Id = destinationDriveId }, Name = newName }; DriveItem? copy = await _graphClient.Drives[listDriveId].Items[sourceDriveId].Copy.PostAsync(destinationInfo); // Problem: "copy" is always null, but it is copied. When I check if the copied file exists, this file exists. if (copy != null) { return copy.Id; } } catch { } return null; } Can you help me? Thank you very much.28Views0likes0CommentsPull out events from a calendar
Good morning, For a project I would have to pull out all the events from the different meeting rooms and integrate them into an HTML. However, when I search with https://graph.microsoft.com/v1.0/users/96d86e71-60d8-4d9a-acad-bd708de3e29a/events I get the error "The specified object was not found in the store." Could someone help me?21Views0likes1CommentPowerApp Graph Custom Connector without User Login
So I've been trying to create an app that will allow users to set and edit their own pronouns and then store those pronouns in Graph for use in Email Signatures and the such. I've been following this tutorial <How to add Azure AD directory extensions> in doing so, and I've basically got it down I've made the app and it works. However, it only works for me, i.e. admins. Whenever another user logs in and they are able to view their pronouns, i.e. GET graph.microsoft.com/me, but can't update their pronouns, PATCH graph.microsoft.com/me?$select=pronouns They get this error: My question is what can I do to get this app to be able to make the changes to this one specific item in graph, or allow for users to be able to edit this for themselves, or something that would make this work. Or perhaps I'm going about it the wrong way. Any help is appreciated, Kamala32Views0likes1CommentTeams Missed Calls
Hi, I would like to know if there is a Graph API that gives me information if a peer to peer call between Teams users has not been successful. Or if a call has not been successful because the caller has abandoned the call, therefore it is a missed call. Regards. P.S. based on following documentation, I cannot find any information about what I'am searching for: List callRecords - Microsoft Graph v1.0 | Microsoft Learn12Views0likes0Comments
Events
Recent Blogs
- ServiceNow tickets Graph connector is now generally available, adding to the suite of Microsoft Graph connectors for ServiceNowJan 17, 20249.9KViews4likes1Comment
- Get complete control of your Graph connectors rollout strategy with a measured exposure of connections to select users and groupsDec 01, 20234.1KViews2likes0Comments