Recent Discussions
Approvals 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.6Views0likes0CommentsDrives search endpoint suddenly stopped working
We are facing an issue where the following endpoint has suddenly stopped working (as of 2024-10-23) for only one of our accounts: https://graph.microsoft.com/v1.0/me/drive/root/search(q='.xls') I am able to see the Excel workbooks I'm searching for /drive/root/children endpoint, but the /search is returning no results in one of the two accounts. I know indexing can be an issue that causes a delay for results to show up from /search, but many of the files on the affected account have been there for 6 months. Comparing the working account to the failing one, I don't see any significant difference in the requests. For both accounts, the OAuth scopes requested are the same (from the decoded Bearer token): "scp": "AllSites.Read Files.Read Files.Read.All Files.Read.Selected Files.ReadWrite Files.ReadWrite.All Files.ReadWrite.AppFolder Files.ReadWrite.Selected Sites.Read.All Sites.ReadWrite.All profile openid email" Both accounts are Business OneDrive accounts. I can even access the workbooks directly on the failing account from the following endpoint: https://graph.microsoft.com/v1.0/me/drive/items/017ZHZ4ENXPMNDLB52LFF3ZX55FHHUGZ3F/workbook/worksheets So it seems that /search is simply not working. Our tool is reliant on the /search endpoint, so it would not be a quick fix to change this and it is affecting some of our customers as well. Is this a known issue or does anyone have another clue on what to check? I'm wondering if search indexing is broken on this account (and our customer's account), but I don't know of any way to force it to re-index the files.Solved191Views0likes2CommentsMS Bookings API - Can't create staff member using MS Bookings API
Hi I'm following this tutorial to use MS Bookings API ( https://learn.microsoft.com/en-us/graph/api/resources/booking-api-overview?view=graph-rest-1.0 ) but I'm stuck in "Add individual staff members for the business" step, the API response is here's my sample request : { "displayName":"Test", "emailAddress": "email address removed for privacy reasons", "role": "externalGuest" } and I always got this error response even that I've provided name and email address { "error": { "code": "ErrorInvalidOperation", "message": "Cannot create a booking staff without name and email.", "innerError": { "date": "2023-09-13T09:27:52", "request-id": "5f90921e-1d45-42c4-ab96-78ff5b6a958b", "client-request-id": "5f90921e-1d45-42c4-ab96-78ff5b6a958b" } } } anyone experience the same issue ? is there any rules on which email address that can be used as staff member ? Regards, Henry1.1KViews2likes4CommentsOneDrive Sharing and Graph "/invite" Endpoint Now Creating Guest Users?
I have an application that integrates with OneDrive via the Graph API, and leverages OneDrive sharing features. Recently I got a new Microsoft E5 dev license, and I've noticed that the sharing workflows and API results are different on this license than on my previous license, and the enterprise licenses of my clients that use the application. All instances are using v1 of the API. On my new license, when I share a OneDrive file/folder using the "/invite" endpoint of the API, it adds the external email I'm sharing with as a Guest on my M365 tenant. It did not do this before. The initial result of the API call to the /invite endpoint is the same as it was previously: [{ 'roles': ['read'], 'grantedToIdentities': [{ 'user': { 'email': '<external email>' } }], 'invitation': { 'signInRequired': True }, 'link': { 'type': 'view', 'webUrl': '<link URL>' } }] However, if I share another file/folder with the same external email, the response is different: [{ 'id': '<permission ID>', 'roles': ['read'], 'grantedTo': { 'user': { 'email': '<external email>', 'displayName': '<external email (minus domain)>' } } }] As you can see, the response now contains "grantedTo" instead of "grantedToIdentity". The response also does not contain a link URL, and I need to perform an extra API call on the permissions of the shared item in order to find the link. This response format matches the responses I expect when I share with internal emails on my tenant, and I can see in the admin centre that the external email has been added as a Guest user. With my old license, and my clients' licenses, external recipients were not added as guests on the M365 tenant, and sharing multiple drive items with the same external user always returned the same format of API response (always including the link URL). Shared Item Access Workflow With my new license, when I use the link to access the shared item with my external email, I am now prompted to provide permissions to my account for the OneDrive tenant (email and tenant domain redacted here for privacy): I am also prompted to set up MFA: With the previous workflow, I just had to enter my email address, then verify the email with a code. I was not prompted to grant permissions or set up MFA. This seems needlessly complicated for sharing drive items with external users, particularly those that are not tech-savvy. Why is the sharing workflow so different on my new dev license? Can I adjust the settings on my tenant to prevent this, or is this how sharing will work going forward? If so, when can I expect this to change for my clients' license? I see no mention of this in the Graph API reference for the Invite endpoint, and I can't find any mention of the change online. I've reviewed the sharing settings in the Sharepoint Admin Centre. However, these are identical to the settings on my old license. I've tried messing with the External Collaboration settings in Entra to prevent guest users from being created, but this prevents me from sharing with external users altogether. I can't find any other settings that may control this behaviour. Please help!Solved13Views0likes1CommentNo 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?38Views0likes4CommentsAuthentication 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 Vatan14Views0likes0Comments- 9Views0likes0Comments
MSGraph Subscription notification missing resource id
Hello all, We are making use of MS Graph to create a subscription on a sharepoint site on drive (root) level (also the same tried for list level). This works fine and we receive notifications. According to this page, for basic notifications, the id of the changed resource should come back in resourceData. The resourceData property is in the body of the notification, but we only get the @odata.type property inside and nothing more. Can anyone please explain what is wrong / what we are missing / how it should work? Thanks!277Views2likes2CommentsMissing 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?6Views0likes0CommentsDid /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? Thanks6Views0likes0CommentsGet-MgProfile : The term 'Get-MgProfile' is not recognized as the name of a cmdlet, function, script
Hi everyone, The cmdlet Get-MgProfile is no longer available after updating to v2.1.0 Even the link is no longer available: https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.people/get-mguserprofile What is the replacement Graph SDK cmdlet to get the existing Microsoft Graph PowerShell SDK connection profile name? Thanks in advance.14KViews1like5CommentsSharepoint 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.12Views0likes0CommentsMicrosoft 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?20Views0likes0CommentsFacing 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?33Views0likes0CommentsDoes 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.20Views0likes0Comments500 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?63Views0likes0CommentsProblem 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?45Views0likes0CommentsProblem 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.23Views0likes0Comments
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, 2024141KViews29likes40Comments
- 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