Forum Widgets
Latest Discussions
Pin 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/<chatID>/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/19:....@thread.tacv2/messages/<message_id>" } Note: - 19:....@thread.tacv2 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.nikhilkuntaApr 15, 2025Copper Contributor10Views0likes0CommentsMissing added files (v1.0/me/drive/recent?$top=1000)
Missing added files In LMS we allow customers to add recent files across organization as course materials. We fetch recent files via graph API call https://graph.microsoft.com/v1.0/me/drive/recent?$top=1000 . Typical scenario for adding files would be the following. 1) user puts file from his PC to whatever location in sharepoint 2) he edits course and sees his file, and its added Currently user won't be able to see his files. Just uploaded files by user are missing from this query results. To make files appear user have to go to sharepoint and click Preview, then Download, then try rename files to make them appear in the query results. It would be very uncofmortable for user (and for our support to explain) to do it to make files appear. Can you please show just added files in https://graph.microsoft.com/v1.0/me/drive/recent?$top=1000 call. Just in case we contacted Microsoft Support 3 times already 2 years ago with no promises to fix it, but new client has same situation, so I decided to post it here as well. Thanks.siarheikApr 14, 2025Copper Contributor2Views0likes0CommentsHow to get a user P.O. Box from Active directory using Graph API
Inside our Active Directory, we have this value for the P.O Box:- now i want to get this value based on the user's email address using graph api, i tried those endpoint, but never able to get the P.O. Box value, here what i tried:- 1) https://graph.microsoft.com/beta/users/<useremail>/profile/ I got this as part of the response, "company": { "displayName": "****", "pronunciation": null, "department": "***", "companyCode": null, "officeLocation": "****", "webUrl": null, "secondaryDepartment": null, "address": { "type": "business", "postOfficeBox": null, "street": "****", "city": "***", "state": "***", "countryOrRegion": "**", "postalCode": "***" } } } there there is postOfficeBox but it is null 2) https://graph.microsoft.com/v1.0/users/<email address> this does not include P.O. Box any advice?johnjohn-PeterApr 10, 2025Iron Contributor49Views0likes4CommentsClone Team endpoint is broken
Microsoft Graph's "clone Team" endpoint is not working as intended and changes its behaviour without any communication from Microsoft. The problem is the new feature that enables users to name the primary channel. Until yesterday, the primary channel was just created as a "normal" channel in the cloned team and an additional primary channel with the default name "General" was created. Since yesterday, the primary channel is now cloned "correctly", but now the tabs are completely ignored and not even the default "Notes" tab is created in the primary channel. So when cloning a team, the primary channel itself is created, but it is just completely empty. Will this be fixed and if so, when? And are there any additional resources for changes in the Graph API that I don't know about? Because this is not mentioned in the Graph API changelog. It seems like Microsoft is indeed working on this, but this last change does not fix anything, it makes it even worse.ChrisConportApr 03, 2025Copper Contributor21Views0likes0CommentsDrives 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.SolvedJohnG_CDataApr 03, 2025Copper Contributor256Views1like4CommentsShould DriveItem permission support grantedToV2 in the future?
I'm trying to retrieve both metadata and permissions for a DriveItem using Microsoft Graph API. However, I noticed that the permission models between GET /drive/items/{item-id} and GET /drive/items/{item-id}/permissions seem inconsistent. References: 1. DriveItem metadata (with permission included): https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/driveitem?view=odsp-graph-online#relationships The permissions property on a DriveItem refers to the Permission resource in the OneDrive API. 2. Permission resource in OneDrive API: https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/permission?view=odsp-graph-online Supports grantedTo but not grantedToV2. grantedTo is not marked as deprecated in this API. 3. Permission resource in Graph API: https://learn.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-1.0 Supports both grandedTo and grantedToV2. Explicitly marks grantedTo as deprecated. Questions: 1. Why is grantedTo not marked as deprecated in the DriveItem metadata response, while it is deprecated in the Microsoft Graph permissions API? (I saw this article mentioning that grantedTo will be deprecated, but it does not specify a timeline.) 2. Should we be using grantedTo or grantedToV2 when retrieving permissions from a DriveItem's metadata? 3. If grantedToV2 is preferred, is there any plan to support grantedToV2 in the GET /drive/items/{item-id} response in the future? This inconsistency makes it unclear whether grantedTo is still valid or if we should be transitioning to grantedToV2 across all endpoints. Any clarification from Microsoft would be greatly appreciated! Thank you.Joe WuApr 02, 2025Copper Contributor19Views0likes0CommentsMS Graph and AzureADUserExtension
Migration from Azure AD to MS Graph documentation, maps Set-AzureADUserExtension to Update-MgUserExtension. I used to use the following command to set user's ExtensionAttribute: Set-AzureADUserExtension -ObjectId <email> -ExtensionName 'extensionAttribute1' -ExtensionValue 'Test' How to do that with Update-MgUserExtension?SolvedKonstantinos N. ChionasApr 02, 2025Copper Contributor1.3KViews0likes3CommentsFailed to list all calendars for certain users with graph api
We failed to list all calendars for certain users with graph api, only 2 calendars are listed. However, when we use ews api, we can list all 7 calendars with FolderClass being IPF.Appointment. Does anyone know why this inconsistency between both apis? graph api endpoint: https://graph.microsoft.com/v1.0/users/8057cafb-1848-4b5d-a213-5dc40453c8f7/calendarGroups/{calendar_group_id}/calendars ews api endpoint: https://outlook.office365.com/EWS/Exchange.asmx <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <t:RequestServerVersion Version="Exchange2013" /> <t:ExchangeImpersonation> <t:ConnectingSID> <t:PrincipalName>user principal name</t:PrincipalName> </t:ConnectingSID> </t:ExchangeImpersonation> </soap:Header> <soap:Body> <m:SyncFolderHierarchy> <m:FolderShape> <t:BaseShape>IdOnly</t:BaseShape> <t:AdditionalProperties> <t:FieldURI FieldURI="folder:ParentFolderId"></t:FieldURI> <t:FieldURI FieldURI="folder:DisplayName"></t:FieldURI> <t:FieldURI FieldURI="folder:FolderClass"></t:FieldURI> </t:AdditionalProperties> </m:FolderShape> </m:SyncFolderHierarchy> </soap:Body> </soap:Envelope>synology_adminApr 01, 2025Copper Contributor19Views0likes0CommentsgrantedTo and grantedToIdentities removed from graph api Permission. What's the exact time table?
Hi, Microsoft announced that the Permission resource of the graph API will be gradually phased out and deprecated the grantedTo and grantedToIdentities fields. We would like to know the exact time table, such as the month and day when the phaseout will begin, and if there are differences in the phaseout time in various regions around the world and a clear time table. Because before this time we need to adjust the eliminated fields to grantedToV2 and grantedToIdentitiesV2 in order to continue to use the following endpoints GET {resource path}/permissions GET {resource path}/permissions/permission-id PATCH {resource path}/permissions/permission-id POST {resource path}/permissions Announcement: https://devblogs.microsoft.com/microsoft365dev/removal-of-deprecated-sharepoint-onedrive-permission-resource-properties/ Thank you~!synology_adminMar 27, 2025Copper Contributor28Views0likes0CommentsIssue with Downloading Teams Sticker via Graph API - HTTP 400 Bad Request
Hi all, I am encountering an issue when attempting to download a sticker from Microsoft Teams using the Graph API. Below are the details of my request and the problem I am facing: Issue Description: I am using the following API format to download a sticker: GET https://graph.microsoft.com/v1.0/teams/xxx/messages/yyy/hostedContents/zzz/$value The request returns an HTTP 400 Bad Request response. The error details are as follows: { "error": { "code": "BadRequest", "message": "Provided hosted content identifier is invalid." }} Upon decoding zzz part of the API request URL, I obtained the following information: id=,type=1,url=https://us-prod.asyncgw.teams.microsoft.com/v1/url/content?url=https%3a%2f%2fstatic.wixstatic.com%2fmedia%2f4b00a4_e293905cf80f4ba4853c80a0a98dd748~mv2.png From the decoded data, it appears that the id field is empty. I suspect that this might be the reason why I am receiving the HTTP 400 Bad Request response. Questions: Has anyone encountered a similar issue when attempting to download a hosted sticker from Teams via the Graph API? Is there a specific reason why the id field is empty in the decoded content information? How can I resolve this issue and successfully retrieve the sticker content? Any insights or guidance on resolving this issue would be greatly appreciated. Thank you for your support. Best regards, KeinKevinChen0512Mar 26, 2025Copper Contributor39Views0likes0Comments
Resources
Tags
- api223 Topics
- Office Graph156 Topics
- developer116 Topics
- office 36593 Topics
- Graph API28 Topics
- App26 Topics
- Microsoft Graph Api20 Topics
- Microsoft Graph14 Topics
- graph11 Topics
- Delve9 Topics