developer
125 TopicsThe requesting principal is not authorized to set group preferred data location
We have our tenant with 4 Geo locations. And inside power automate flow I am sending this Graph Api to create a new security group under specific Geo location:- but I am getting this error:- The requesting principal is not authorized to set group preferred data location. Now if i remove this parameter:- "preferredDataLocation": "AUS", the Office 365 group will get created under the default location, but I need to add it to the specific location. the service account running the graph Api call has SharePoint, group and teams admin permissions. any advice? Thanks33Views0likes0CommentsGraph API : Authorization_RequestDenied Message: Insufficient privileges to complete the operation.
Hi Team, I have a Graph app and user configured with the following resourceAccess scopes: Code "resourceAccess": [ { "id": "06da0dbc-49e2-44d2-8312-53f166ab848a", "type": "Scope" }, { "id": "9c7a330d-35b3-4aa1-963d-cb2b9f927841", "type": "Scope" }, { "id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d", "type": "Scope" }, { "id": "b340eb25-3456-403f-be2f-af7a0d370277", "type": "Scope" } ] However, when trying to pull presence data, I receive the following error in Postman: Code StatusCode: Forbidden Message: Code: Authorization_RequestDenied Message: Insufficient privileges to complete the operation. Graph Explorer also fails to return presence for a specific user using: https://graph.microsoft.com/beta/users/{user-id}/presence But the endpoint for the signed-in user works fine: https://graph.microsoft.com/beta/me/presence Admin consent has been granted, and even the Global Admin cannot retrieve presence for other users. Other permissions work fine — the app can list users and connect without issue. Presence is the only operation failing. Question: How can I investigate this behavior in Azure/Entra using the request-id or client-request-id from the error response? Or what could cause this behavior? Thanks in advance!29Views0likes0CommentsQuery Regarding Duplicate Message IDs from Microsoft Graph API
Hello Microsoft Support Team, I am currently using the Microsoft Graph API to fetch email messages from the inbox of a my support email in my PHP application. However, I am encountering an issue where the API returns duplicate message IDs for emails. This is causing problems as emails with the same id are being processed multiple times, which results in duplicate ticket creation in my CRM system. To avoid this, I am currently checking and skipping duplicate IDs manually in my application. However, I would like to understand the root cause of these duplicates and whether there is an official recommendation or best practice to handle such cases effectively. Here are some additional details: API Endpoint: GET graph.microsoft.com/beta/users/$userEmailEncoded/mailFolders/Inbox/messages?\$top=20&\$orderby=receivedDateTime%20desc Issue: Duplicate message IDs (id) returned for the same email. Current Handling: I am skipping already processed emails using a tracking for message IDs to prevent duplicate ticket creation. Additionally, I have a few more queries regarding the use of internetMessageId and fetching attachments: Problem with internetMessageId: When I use internetMessageId, the internetMessageId of a replied message returns null. How can I use this ID effectively to manage or track message threads and replies? Attachments with internetMessageId: Is it possible to fetch attachments for a message using the internetMessageId? I am trying to retrieve attachments for a specific email using this ID, but I am not sure how to do this efficiently. Could you please advise on the following: Is there a recommended way to handle or filter out duplicate emails when fetching email data from the Graph API? Is there any mechanism in the API to ensure unique messages, especially when calling this endpoint frequently? How can I properly use internetMessageId for tracking message threads and replies, and why is it returning null for replied messages? Can I retrieve attachments using internetMessageId or is there another method for doing so? I would greatly appreciate any guidance or suggestions you can provide. Thank you for your time and assistance. Best regards, Krishna Adroja email address removed for privacy reasons117Views1like2CommentsThe specified object was not found in the store., The process failed to get the correct properties.
Hi, I've set up a change notification using the Microsoft Graph API so that Microsoft sends webhook notifications to our server whenever a new email arrives in a specific mailbox. Each notification includes the ID of the new email. Our server then uses this ID to retrieve the email body via an HTTP GET request to Microsoft Graph. However, we've encountered a few instances where the server receives a error when attempting to retrieve the email. The error message is: Error Message: Exception: Microsoft.Graph.Models.ODataErrors.ODataError: The specified object was not found in the store., The process failed to get the correct properties. Has anyone experienced this before or have any insights into why this might be happening? Thanks!45Views0likes0CommentsMail delivery fail when I Add events to Calendar
Hello I have a Contoso tennant for Developer tasks We are creating one web app for room reservations in a corporation using 365 accounts After some "ok" tests, the reservation has started to fail because the sender has been put in Spam list the fail message email that the sender email account get is Your message wasn't delivered because the recipient's email provider rejected it. Remote server returned '550 5.7.501 Service unavailable. Spam abuse detected from IP range... The api we are using use the calendar var res = await graphClient.Users[currUserId].Calendar.Events .Request() .AddAsync(evento); Any trick to avoid this problem? Thank you in advance Bruno315Views0likes1CommentGraph API Issue to Search and GetContent from sharepoint
Hello, I’m using MS Graph to integrate an application with SharePoint. I’ve already implemented all the necessary requirements to query files, create folders, upload files, and download them. However, I’m facing an issue and have tried different ways to resolve it, unfortunately without success. When I upload a file, it completes successfully—confirmed both by the API response and by visually checking SharePoint. However, when I query the file using the Search API (`https://graph.microsoft.com/v1.0/drives/" + IdDirectory + "/search(q='{" + FileName + ".pdf}')`), the response is empty. In some cases, the expected result does appear, but only after several minutes (around 15 to 20 minutes). While debugging my application, I’ve confirmed that the search parameters are correct. Has anyone else experienced this? And if so, was there a solution?34Views0likes0CommentsGetting 403 Unauthorized on Graph API Mail Access (School Project with Consent Given)
Hi everyone, I'm currently working on a school project involving the Microsoft Graph API, and I'm running into an issue. I hope someone in here can help me with it. The project is called Sumday. it’s a concept app that pulls in emails daily from a user's mailbox, summarizes them using the ChatGPT API into a to-do list, and then creates tasks in Microsoft To Do. The goal is to provide users with a daily productivity summary and action plan based on their incoming mail. The issue is this: Even though another user has granted consent to my app registration (via delegated permissions), I receive a 403 Unauthorized error on every API call when trying to read their mailbox. I understand that delegated permissions require the signed-in user to match the mailbox being accessed, but since this is just a school project and not a production application, I’m wondering: Is there any workaround or sandbox approach that allows this kind of delegated access to be simulated? Is the issue caused by Microsoft 365 education/school tenant restrictions? Since I can log in and access my own mailbox just fine, is there a way I can safely test cross-user scenarios for demo purposes? Important note: I did manage to get this working using a Logic App, but that’s not the approach I want to take for this project. My goal is to integrate everything within my own app and codebase, so relying on Logic Apps is more of a temporary workaround rather than a long-term solution. I’m not trying to bypass any limitations just hoping to better understand what’s possible in this context and how I can move forward with developing and testing the core idea. If anyone has insights, experience, or advice on this, I’d really appreciate your help. Thanks in advance! Best, Chris148Views0likes4Comments"User content migrated" Error when Creating OneDrive Webhook Subscription
Dear Microsoft Community, Our application is encountering an undocumented error when attempting to set up a Webhook Subscription to a OneDrive app-root folder (/drive/special/approot). This issue began approximately one day after deployment, following an initial period where the subscription process worked correctly, and has now persisted for several weeks. Here's the full error message: { "error": { "code": "ExtensionError", "message": "Operation: Create; Exception: [Status Code: ServiceUnavailable; Reason: User content migrated. Cannot access disabled item.]", "innerError": { "date": "2025-06-10T10:58:15", "request-id": "edff6dc0-45b7-4e7c-8797-3134ebc6bae4", "client-request-id": "edff6dc0-45b7-4e7c-8797-3134ebc6bae4" } } } Could this error be related to: - The absence of an MPN ID? - The type of Microsoft account used for app registration (personal vs. work account)? Any insights or suggestions would be greatly appreciated!67Views0likes0CommentsUnexpected 429 Errors from SharePoint /list and /content APIs – Not Near Documented Limits
Hi everyone, I'm currently working with the Microsoft Graph /list API to retrieve files from a SharePoint document library and then using the /content endpoint to download each file. After processing approximately 1000 records, I began receiving 429 Too Many Requests errors. On reviewing the API traffic from my application, I found that we're only making about 150 API calls per minute, which is well below the documented thresholds. According to Microsoft’s guidance on avoiding throttling in SharePoint Online (link to docs), the usage is nowhere near the stated API or egress limits — especially the tenant-level thresholds like 1,200 API calls/min or 100GB/hour egress. What’s puzzling is the lack of transparency — I’m unable to find any dashboards, logs, or reports in Microsoft 365 or Entra that show how many API requests are being made or what limits are being approached. My questions: Are there any hidden or undocumented limits (e.g., per-user, per-app, or per-site collection)? Could /content downloads have higher cost per call or impact the limit differently? Is there any way to monitor detailed API usage against SharePoint or Graph API from the Microsoft portal? Would appreciate any guidance or insights from others who’ve faced similar issues! Thanks in advance!47Views0likes0CommentsPin a message in a channel in MS Teams using MS Graph API
I've created a MS Teams app and as part of it's functionality, it has to pin the message (in both one-on-one chat and in a channel) on behalf of the user I'm using below API to pin a message in a channel in MS Teams https://graph.microsoft.com/v1.0/chats/19:....@thread.tacv2/pinnedMessages Endpoint: - POST https://graph.microsoft.com/v1.0/chats/19:....@thread.tacv2/pinnedMessages Body: { "email address removed for privacy reasons": "https://graph.microsoft.com/v1.0/chats/https://graph.microsoft.com/v1.0/chats/19:....@thread.tacv2/pinnedMessages/messages/<message_id>" } Note: - https://graph.microsoft.com/v1.0/chats/19:....@thread.tacv2/pinnedMessages is the chatID of the channel And I get a successful response as below 201 Created { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats('19%3.......%40thread.tacv2')/pinnedMessages/$entity", "id": "<message_id>" } But when I go that particular channel, I don't see the message as the pinned message in the channel But when I try to get the list of pinned message in a channel using below API, it gives the response that the above message which I pinned. But I don't see it in the channel in MS Teams. And I'm facing this issue only while pinning the message in the channel using MS Graph API. I don't face the same issue with one-on-one chat with the bot I've created.93Views0likes1Comment