Recent Discussions
Microsoft 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?2Views0likes0CommentsFacing 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?31Views0likes0CommentsDoes 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.18Views0likes0Comments500 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?43Views0likes0CommentsProblem 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?42Views0likes0CommentsProblem 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.14Views0likes0CommentsPull 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?17Views0likes1CommentPowerApp 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, Kamala25Views0likes1CommentTeams 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 Learn7Views0likes0Commentsget "First Published Date" through graph api lists
I have a number of SharePoint sites that publish news articles. One of the Key fields is "First Published Date". Which shows if the article is published or still in draft. I'm using GET https://graph.microsoft.com/v1.0/sites/{siteId}/pages$filter=promotionKind eq 'newsPost' which returns all the news pages in a site. there is an additional field called first published date I can see in the library. And I can see it using GET /sites/{site-id}/lists/{list-id}/columns { "columnGroup": "_Hidden", "description": "", "displayName": "First Published Date", "enforceUniqueValues": false, "hidden": false, "id": "c84f8697-331e-457d-884a-c4fb8f30ea74", "indexed": true, "name": "FirstPublishedDate", "readOnly": true, "required": false, "dateTime": { "displayAs": "default", "format": "dateTime" } }, But this column isn't returned using the sites/pages get request. I have also tried to force it to show by using $select=FirstPublishedDate but I get the error { "error": { "code": "BadRequest", "message": "Parsing OData Select and Expand failed: Could not find a property named 'FirstPublishedDate' on type 'microsoft.graph.baseSitePage'.", "innerError": { "date": "2024-11-07T13:30:16", "request-id": "1ba721f9-7ae0-43ab-8fe1-89a598245c02", "client-request-id": "a2fd61e8-c652-6b22-ea3f-037655568ddf" } } } how can I get the value of this field for a page?30Views0likes0CommentsDo you know any example to upload file to a specific folder (identified by folderId)? with Graph v5.
Hello. I'm just starting out with SharePoint and Microsoft 365. I need to upload a file to a specific folder in a SharePoint library using Graph v5.61. I've managed to upload it to the root of the library: publicasyncTask<string>UploadFile2Root(stringlistId,stringfileName,byte[]fileBytes) { stringfileId=""; Drive?drive=await_graphClient.Sites[SITE_ID].Lists[listId].Drive.GetAsync(); GraphSDK.Drives.Item.Root.RootRequestBuildertargetFolder=_graphClient.Drives[drive?.Id].Root; using(MemoryStreamstream=newMemoryStream(fileBytes)) { awaittargetFolder .ItemWithPath(fileName) .Content .PutAsync(stream); DriveItem?uploadedItem=awaittargetFolder.ItemWithPath(fileName).GetAsync(); fileId=uploadedItem?.Id??""; } returnfileId; } The problem is when I try to use a specific folder (folderId has the correct value): var targetFolder=_graphClient.Drives[drive?.Id].Items[folderId]; I always get the error: "Microsoft.Graph.Models.ODataErrors.ODataError: 'The resource could not be found.'" Could you tell me how to solve the problem or an example that does this task? I have also tried: https://learn.microsoft.com/en-us/answers/questions/1517434/how-to-upload-a-file-to-a-sharepoint-driveitem-fol and other examples, but without success. I'm also trying to retrieve something similar to an ItemRequestBuilder. Thank you very much in advance.40Views0likes1CommentCorrelation 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!36Views0likes0CommentsDoes Microsoft a way of searching an organization's code for Windows Enterprise organization?
Has there ever been a Microsoft product that allows one tosearch by code syntax (in internal cloud) of certainspecific extension files--like Gitlab or Bitbucket can do? At my organization, the Sharepoint and even the Azure's Microsoft graph is moving toward """Content""" and AI-based search. During this transition, I have found its often harder and harder to find certain files and emails in my organization based on symbols that document might contain. These are examples of symbols that are really important to my business... %m+% # perhaps the most important symbol to the accounting and finance %w+% # the biweekly version of the same symbol %>% |> Its come to the point, that I have a local OneDrive copy where thousands 1000 kb or less (1.2 Gb of storage space) file are saved just so I can use more simplistic search methods over these files. But I feel like its such a waste.... if there was a better method. So I was curious if anyone at Microsoft has ever come up with a cloud based solution to the code search and exact search problem that has become worse as a result of reliance on OpenAI43Views0likes0CommentsAll Sources tab for search heavily weighted for M365 content
Is anyone using non-M365 connectors for their search athttps://www.microsoft365.com/or https://www.office.com/? We have a lot of content in Wordpress, ServiceNow, Saba, etc...that we are trying to return in the search results for employees. Unless they use the connector source in the All Sources tab, the results are pages and pages of Microsoft content if you ever get to the connector content you are looking for. Anyone else experiencing this?34Views0likes0CommentsProperty name (guid / namespace) scope and rules for custom single value extended properties
Hello, I need to add a custom extended property on events and intend to use a "named" "single-value extended properties" as explained in extended properties overview , with a property identifiers in the 0x8000-0xfffe range as in the example: "{type} {guid} Name {name}" "String {8ECCC264-6880-4EBE-992F-8888D2EEAA1D} Name TestProperty" Identifies a property by the namespace (the GUID) it belongs to, and a string name. The MAPI Property Identifier Overview states that : Beyond 0x8000 is the range for what is known as named properties, or properties that include a 128-bit globally unique identifier (GUID) and either a Unicode character string or 32-bit numeric value. Clients can use named properties to customize their property set As a new developper in Office365 environment, the GUID generation and its scope in office365 are not quite clear to me : Does it means that we are free to use any 128-bit GUID/Namespace in the 0x8000 range to set a custom named property ? What is the scope of the GUID/namespace in that context ? Is it limited to my graph client application or shared with others ? Even if the conflict risk looks weak, is there a method to check/generate my GUID ? or to get some GUIDs already used somewhere that could collide with the one i am using ? Regards,118Views0likes0CommentsHow to move item specifying @microsoft.graph.conflictBehavior
Hello, I need to move items but need to set the Sander.graph.conflictBehavior to replace. What I'm currently trying to do in python but doesn't set the Sander.graph.conflictBehavior strategy: import requests import json requests.patch( 'https://graph.microsoft.com/v1.0/drives/MYDRIVEID/items/MYITEMID?@microsoft.graph.conflictBehavior=replace', data=json.dumps({'parentReference': {'driveId': 'MYDRIVEID', 'path': 'MYNEWPARENTLOCATION'}}), headers={'Authorization': 'Bearer MYTOKEN', 'Content-Type': 'application/json', 'Prefer': 'IdType="ImmutableId",bypass-shared-lock'} ) This gives me error 409 conflict, but I want the replace to force the move of folder to its new parent locaiton. Any idea ? Thanks51Views0likes0CommentsIntelligent Search IP Kit
Hi, I would like to kindly ask you for help. Currently I have studied Microsoft search and options how to improve it. I have found these search components on this official video (https://youtu.be/jKpIDBalLW0?si=M_qVbY4KWOrZEVy7&t=2103). Unfortunately I have not found any further information where to find those components to use it. Does anyone have an experience with that? It will be really useful and I really appreciate it. I have tried to send an email to mentioned address but unfortunately it does not exist anymore. Thank you for your response. Best regards and have a nice day Mirek 🙂39Views0likes0CommentsReorder Teams Channel tabs, move a 3rd tab to be the last tab?
I have an automate power automate flow which Create a Teams site, channels & tabs. now inside the General channel, we add the following custom tabs (Active DashBoard, Incident -12: Tasks and Template & training), as follow:- but i will get those 3 built-in tabs; Posts, Files and Notes.. now how i can move the Notes tab to be last tab ? using Graph API? Thanks57Views0likes0Comments
Events
Recent Blogs
- Using computer vision technology, when you upload images, the location data (if available) from a photograph (such as Oslo, Norway), the identification and extraction of text will happen automaticall...Aug 15, 2024140KViews29likes40Comments
- Acronym answers in Microsoft Search are rolling out worldwide beginning January 27, 2020. Learn more about how to make sense of your company's acronyms with Microsoft Search.Jun 05, 202437KViews7likes38Comments