msgraph
5 TopicsPin 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.63Views0likes1CommentPossible bug with getting Special Folder query
Hello, Based on the documentation I can perform the following query to get data about a certain Special folder in OneDrive. It works perfectly if I query myself: https://graph.microsoft.com/v1.0/me/drive/special/documents However, if I enter an actual "userId" https://graph.microsoft.com/v1.0/{userId}/drive/special/documents I'm getting data from a shared site, instead of my personal. {me}: https://contoso-my.sharepoint.com/personal/alex_growtek_contoso_com/Documents/Documents {userId}: https://contoso.sharepoint.com/Shared%20Documents/Documents Is it a bug? As I couldn't find the way to fix that.258Views0likes0CommentsGraph API deleted user attributes and searching / filtering
Is there a way to search deleted users by attributes with the Graph API? If so, which attributes are searchable? If I need to restore an account that I don't have the id / objectid for, I have to retrieve all deleted users and then filter the results. Also, is there a way to retrieve the onPremisesImmutableID and the lastDirSyncTime of a deleted user that was federated with AzureADConnect?508Views0likes0CommentsIssues with POST to GraphAPI with Powershell
I can export Intune policies using the API so i know i'm authenticated but when I try to POST one of the policies i get a response but its just a repeat of the JSON file and no Error or 201 success message. Invoke-RestMethod -Uri https://graph.microsoft.com/Beta/deviceManagement/deviceCompliancePolicies -Headers $global:authToken -Method POST -Body $json_output -ContentType "application/json" If i take the JSON file and paste it in to the body of MSGraph Explorer it works but i'm not sure why i'm not getting a response back.354Views0likes0CommentsAPI doc for msgraph deviceGeoLocation and hardwareInformation does not mention url path
I am trying to integrate intune api with my application. The API doc for msgraph deviceGeoLocation (https://learn.microsoft.com/en-us/graph/api/resources/intune-devices-devicegeolocation?view=graph-rest-1.0) and hardwareInformation (https://learn.microsoft.com/en-us/graph/api/resources/intune-devices-hardwareinformation?view=graph-rest-beta) does not mention url path for the resource. I have tried a few url paths as a gues but I got 400 /deviceManagement/managedDevices/{id} and I got data /deviceManagement/managedDevices/{id}/deviceGeoLocation -> 400 Unsupported (both 1.0 and beta) /deviceManagement/managedDevices/{id}/hardwareInformation -> 400 Unsupported (beta) Please suggest what url paths must I use to get these resources540Views0likes0Comments