Unable to get teams message attachment content using graph API - microsoft-graph-api

I am able to get message attachment information as shown below but unable to download the file content which is stored in share point site.
"attachments": [
{
"id": "fc323b65-2cee-48d9-9574-0e26eb74e9bb",
"contentType": "reference",
"contentUrl": "https://otdeveloper.sharepoint.com/sites/Test/Shared Documents/General/1Ex.txt",
"content": null,
"name": "1Ex.txt",
"thumbnailUrl": null
}
]
I am using the following get call for the above request with auth token
GET https://graph.microsoft.com/beta/groups/{{TeamId}}/drive/root:/Test/Shared Documents/General/1Ex.txt:/content
I tried the solution posted in
https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/200
but I am getting 404 response.

Could you please check Get message API.You will receive the the attachments info in the response as shown below

Related

How can update roomle component via roomle API?

I'm following docs of roomle at https://docs.roomle.com/rapi/endpoints/Component.html#post
but I dont see any example for the body content of update method.
And I got an error message when update a component
{
"error": {
"type": "BAD_REQUEST",
"message": "you need to be in cms context",
"status": "BAD_REQUEST",
"statusCode": 400
}}
My body request -
PUT: https://api.roomle.com/v2/components/component_test
{
"component": {
"externalIdentifier": "component_test",
"catalog": "delife",
"id": "delife:component_test",
"configuration": "{\"id\":\"delife:component_test\",\"parameterGroups\":[{\"key\":\"chairGr\",\"global\":true,\"labels\":{\"en\":\"Sitzschale1\"}}]}",
"active": false,
"version": 3
}}
P/s: with the api to get component detail work good
Actually, the intended way is to use the Rubens Admin (admin.roomle.com) interface for posting catalog changes. Please refer to https://docs.roomle.com/web/datamanagement/ for documentation on Rubens Admin.

ms botframework attachment can not generate sharelink

I use botframework api to send message to users.
the message contains attachment.
So I send the activity like this
{
"attachments": [{
"contentType": "application/vnd.microsoft.teams.card.file.info",
"contentUrl": "https://contoso.sharepoint.com/personal/johnadams_contoso_com/Documents/Applications/file_example.txt",
"name": "file_example.txt",
"content": {
"uniqueId": "1150D938-8870-4044-9F2C-5BBDEBA70C8C",
"fileType": "txt",
}
}]
}
And I send bot message to user like this
And I want to generate sharelink by clicking this button
But I got a error that told me I can's generate sharelink
Does anyone knows the reason?
This issue is confirmed by the original post that it's caused by incorrect uniqueID. The uniqueID is not the itemID in one drive.
For more information about different IDs for botframework, please refer to document here: https://learn.microsoft.com/en-us/previous-versions/azure/bot-service/bot-service-resources-identifiers-guide?view=azure-bot-service-3.0

I can't get this Google Sheets API Get request to work

I am trying to have a game to request data from the Google Sheets API, and I can't get the API Key to function properly. I can visit my API Link in the browser, and it tells me it is getting HTTP 400 (Bad Request) and Google additionally says it's a bad API Key, despite having JUST generated it. For reference my link looks like this: "https://sheets.googleapis.com/v4/spreadsheets/[SHEET_ID]?key=[API_KEY]/values", and the browser views this when using it:
"error": {
"code": 400,
"message": "API key not valid. Please pass a valid API key.",
"status": "INVALID_ARGUMENT",
"details": [
{
"#type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "API_KEY_INVALID",
"domain": "googleapis.com",
"metadata": {
"service": "sheets.googleapis.com"
}
}
]
}
}
I have absolutely no idea what is going wrong, I know the API key and Sheet ID are right (Directly copied each from their respective source).

groupPolicyConfigurations/{groupPolicyConfigurationId}/updateDefinitionValues can't update configuration with API

I am trying to update my Microsoft Intune Configuration using Microsoft Graph API.
For this I am using Postman. I have set up an app registration to assign the needed permissions and retrieve an access token. This is working in so far that I can read most of my configurations.
Now I am trying to change a configuration using POST /deviceManagement/groupPolicyConfigurations/{groupPolicyConfigurationId}/updateDefinitionValues. (Docs)
Now the problem is when I forming the request according to the docs:
{ "added":[],
"updated":[{
"#odata.type": "#microsoft.graph.groupPolicyDefinitionValue",
"createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
"enabled": true,
"configurationType": "policy",
"id": "<id>",
"lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00"
}],
"deletedIds":[]}
I get:
error code: BadRequest
"date": "2020-11-04T19:04:33",
"request-id": "c66c508b-0f73-4e7f-966a-97bf460818be",
I also tried to inspect the requests sent by the Azure Portal when changing the it in the UI and the Graph API request sent by the UI is quite a bit different than the one from the docs:
{ "added":[],
"updated":[{
"id":"<id>",
"enabled":true,
"presentationValues":[],
"definition#odata.bind":"https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions('<id>')"
}],
"deletedIds":[]}
and this one returns a HTTP 403 Forbidden I get a
error code: BadRequest
"date": "2020-11-04T19:04:27",
"request-id": "c70d67bc-b4d4-40cc-b2c9-7d60896f972a",
Unfortunately the response does not contain any information on what exactly the issue is and I don't know if there is any logs where I could find a more detailed error description.
Does anybody have experience with this and knows where I could get the correct payload for the request?

A post call to add a new openTypeExtension to event data fails with “Resource not found for the segment 'extensions'”

I am trying to add an extension to the event resource using Graph Explorer. I am using POST on https://graph.microsoft.com/v1.0/event/extensions with request body
{
"#odata.type": "microsoft.graph.openTypeExtension",
"extensionName": "com.wrike.WrikeIDs",
"id": "",
"permalink": ""
}
I get the error
"Resource not found for the segment 'event'"
and sometimes I get
"The OData request is not supported"
Content type is application/json
The error message might be misleading.
Try to adjust the path to
POST https://graph.microsoft.com/v1.0/me/events/{event_id}/extensions

Resources