I'm trying to create a windowsMobileMSI app in intune.
I use the following JSON:
{
"#odata.type": "#microsoft.graph.windowsMobileMSI",
"displayName": "API uploaded Package",
"description": "Desc of Api uploaded pkg",
"publisher": "publisher 1",
"isFeatured": false,
"privacyInformationUrl": "",
"informationUrl": null,
"owner": "owner 1",
"developer": "dev 1",
"notes": "no notes",
//File info
"committedContentVersion": "1",
"fileName": "PackageProvider.msi",
"size": 409664,
"identityVersion": "1.0.8",
"commandLine": "",
"productCode": "{cc12adbd-8692-458d-b186-9d83b639ff1d}",
"productVersion": "1.0.8",
"ignoreVersionDetection": false
}
However when I post it to
POST https://graph.microsoft.com/beta/deviceAppManagement/mobileApps
I get the error message
{
"error": {
"code": "BadRequest",
"message": "An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: fd5ee560-f4da-4255-b893-aa133c60fe4b - Url: https://fef.amsub0102.manage.microsoft.com/StatelessAppMetadataFEService/deviceAppManagement/mobileApps?api-version=5017-10-18 - CustomApiErrorPhrase: ",
"innerError": {
"request-id": "fd5ee560-f4da-4255-b893-aa133c60fe4b",
"date": "2017-12-22T08:31:35"
}
}
}
I took the lines below the "//File info" comment from an existing windowsMobileMSI app.
I tried removing of these lines but it didn't help me.
Can anyone advise me what is wrong with my JSON?
I've got an advice to use only the "identityVersion" after the //File info.
So here's the JSON that works now:
{
"#odata.type": "#microsoft.graph.windowsMobileMSI",
"displayName": "API uploaded Package",
"description": "Desc of Api uploaded pkg",
"publisher": "publisher 1",
"isFeatured": false,
"privacyInformationUrl": "",
"informationUrl": null,
"owner": "owner 1",
"developer": "dev 1",
"notes": "no notes",
//File info
"identityVersion": "1.0.8",
}
Try removing "size": 409664 from the JSON.
Related
Request URL
https://graph.microsoft.com/v1.0/teams
Request Body
{
"template#odata.bind": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
"displayName": "Team22",
"description": "My Sample Team’s Description",
"members": [
{
"#odata.type": "#microsoft.graph.aadUserConversationMember",
"roles": [
"owner"
],
"user#odata.bind": "https://graph.microsoft.com/v1.0/users('vishalkumar#4vswmg.onmicrosoft.com')"
}
]
}
Response Code 404
Response Preview
{
"error": {
"code": "NotFound",
"message": "Failed to find users with user principal name 'vishalkumar#4vswmg.onmicrosoft.com'",
"innerError": {
"date": "2022-05-13T06:55:15",
"request-id": "9df9a8fa-21cc-4455-b39f-ef1aca1d4b07",
"client-request-id": "24d55bd6-3f77-b808-221e-3f1a7af7dd5a"
}
}
}
The following payload worked for me:
Ref Doc: https://learn.microsoft.com/en-us/graph/api/team-post?view=graph-rest-1.0&tabs=http#example-9-application-permissions-using-user-principal-name
"template#odata.bind":"https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
"displayName":"My Sample Team",
"description":"My Sample Team’s Description",
"members":[
{
"#odata.type":"#microsoft.graph.aadUserConversationMember",
"roles":[
"owner"
],
"user#odata.bind":"https://graph.microsoft.com/v1.0/users('jacob#contoso.com')"
}
]
}```
Keep in mind you can add only one owner at the time of Team creation using Graph API
I have sideloaded a teams app with an activity type, so that I could I could use the activity feed graph api. However, when I send a teams/<teamId>/sendActivityNotification request, I get 501 "Not Implemented". There are no specifics in the response.
{ "error": { "code": "NotImplemented", "message": "Failed to process request.", "innerError": { "date": "2021-04-16T07:48:31", "request-id": "bd92c3a5-9ec5-49a1-a2d5-057f7dd3c182", "client-request-id": "bd92c3a5-9ec5-49a1-a2d5-057f7dd3c182" } }}
I think I may be missing something about how graph API integrates with teams apps.
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.8/MicrosoftTeams.schema.json",
"manifestVersion": "1.8",
"id": "<APP_ID>",
"version": "1.0",
"packageName": "com.nikita",
"developer": {
"name": "Nikita Cool Dude",
"websiteUrl": "https://www.microsoft.com",
"privacyUrl": "https://www.microsoft.com",
"termsOfUseUrl": "https://www.microsoft.com"
},
"name": {
"full": "MMM service test",
"short": "MMM service test"
},
"accentColor": "#FFFFFF",
"description": {
"full": "Packages mmm activity types.",
"short": "Packages mmm activity types."
},
"icons": {
"outline": "mmm-small.png",
"color": "mmm-small.png"
},
"activities": {
"activityTypes": [
{
"type": "mmmChannelCreated",
"description": "New channel is created for an mmm event",
"templateText": "New <priority> <cfs> event"
}
]
},
"connectors": [
{
"connectorId": "<APP_ID>",
"scopes": ["team"]
}
]
}
Note that I am adding a connector I'm not using. Otherwise I get Error while reading manifest.json: "configurableTabs, staticTabs, bots, connectors, or composeExtensions" is required error when sideloading the app. The app id is created through portal.azure.com.
Below is the request payload, in case that is relevant. I based it very closely on examples in the graph API documentation.
{
"topic": {
"source": "entityUrl",
"value": "https://graph.microsoft.com/v1.0/teams/<teamId>/channels/<channelId>",
},
"activityType": "mmmChannelCreated",
"previewText": {
"content": "New important event!"
},
"templateParameters": [
{
"name": "priority",
"value": "P1"
},
{
"name": "cfs",
"value": "Armed Robbery"
}
]
}
Any ideas are appreciated!
In your manifest webApplicationInfo section is missing. The Teams app manifest must have the Azure AD app ID added to the webApplicationInfo section. Follow the requirements provided in documetation to use sendActivityNotification.
Using the Microsoft Graph API (v1.0) sites/{site-id}/lists/{list-id}/items end-point to try and find any new documents that have had a Compliance Tag applied. In the fields I see _ComplianceTagWrittenTime but when I supply that field into the filter I'm given 'field not recognized' error
Here is the list of fields
"fields": {
"#odata.etag": "\"etag\"",
"FileLeafRef": "Test.docx",
"id": "1",
"ContentType": "Document",
"Created": "2019-06-27T18:08:27Z",
"AuthorLookupId": "6",
"Modified": "2020-01-05T23:39:12Z",
"EditorLookupId": "6",
"_CheckinComment": "",
"LinkFilenameNoMenu": "Test.docx",
"LinkFilename": "Test.docx",
"DocIcon": "docx",
"FileSizeDisplay": "19243",
"ItemChildCount": "0",
"FolderChildCount": "0",
"_ComplianceFlags": "7",
"_ComplianceTag": "Short Record",
"_ComplianceTagWrittenTime": "2020-11-02T19:41:16Z",
"_ComplianceTagUserId": "6",
"_IsRecord": "7",
"_CommentCount": "",
"_LikeCount": "",
"_DisplayName": "",
"Edit": "0",
"_UIVersionString": "6.0",
"ParentVersionStringLookupId": "1",
"ParentLeafNameLookupId": "1"
}
This call works https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items?expand=fields&filter=fields/Modified gt '2019-01-05T23:39:12Z'
but this one https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items?expand=fields&filter=fields/_ComplianceTagWrittenTime gt '2019-01-05T23:39:12Z'
returns
{
"error": {
"code": "invalidRequest",
"message": "A provided field name is not recognized",
"innerError": {
"date": "2020-11-03T17:33:52",
"request-id": "{request-id}",
"client-request-id": "{client-id}"
}
}
}
No, you cannot filter the list items as of now as there is no support for it. Please upvote an already existing feature request in the Microsoft Graph Feedback forum.
The new way to upload images as hosted content through the Send Message endpoint is great! However, is there a way to upload text/plain as hosted content in order to post a Code Snippet Card in a message?
I have tried uploading text but the response gives me an error that says that the only content types allowed are 'image/jpg,image/jpeg,image/png'.
Example request:
{
"body": {
"contentType": "html",
"content": "<attachment id=\"4d92eb51ab9c48ebb5b364794a2fa569\"></attachment>"
},
"attachments": [
{
"id": "4d92eb51ab9c48ebb5b364794a2fa569",
"contentType": "application/vnd.microsoft.card.codesnippet",
"contentUrl": null,
"content": "{\"name\":\"\",\"language\":\"CSharp\",\"lines\":1,\"wrap\":false,\"codeSnippetUrl\":\"../hostedContents/1/$value\"}",
"name": null,
"thumbnailUrl": null
}
],
"hostedContents":[
{
"#microsoft.graph.temporaryId": "1",
"contentBytes": "VGVzdA==",
"contentType": "text/plain"
}
]
}
Response:
{
"error": {
"code": "BadRequest",
"message": "Unsupported content type in hostedContent with Id '1'. Allowed values are 'image/jpg,image/jpeg,image/png'",
"innerError": {
"date": "2020-10-07T12:17:15",
"request-id": "ed24f5df-3e1f-4871-b430-e4c1c9f30348",
"client-request-id": "ed24f5df-3e1f-4871-b430-e4c1c9f30348"
}
}
}
I received an answer in the Documentation GitHub: https://github.com/microsoftgraph/microsoft-graph-docs/issues/10210#issuecomment-705050649
Code snippets are not supported at the moment. They are on list of things to support, but there is no timeline to share yet.
Has anyone got Microsoft Graph API working for EventMessage? i.e reading email content of EventMessage using Graph API.
Looks like it has actionable card and graph API 1.0 is not able to read it.
Provided delegate access to user for a room resource.
On event creation for that room, mail is received by the delegated user in inbox. The mail type is eventMessage ("#odata.type": "#microsoft.graph.eventMessage").
On fetching the mail through GraphAPI v1.0, the event values are not visible in the response.
Also on setting the Expand property for the mail in graph API as per docs, results in below error.
{ "error": {
"code": "BadRequest",
"message": "Parsing Select and Expand failed.",
"innerError": {
"request-id": "310bbcce-bdd8-4cb6-890c-035243a5ab6d",
"date": "2020-01-21T09:18:10"
}
}
}
I'm unable to repro your issue. The Microsoft Graph API returns details for event messages. Can you provide repro steps, request/response capture, and the values that you'd expect to see?
I used v1.0/me/messagesto get all of the messages to find an eventMessage. I then perform the following to get details on the eventMessage:
GET https://graph.microsoft.com/v1.0/me/messages/{messagedId}
Response body:
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('d09-94-498-a9777d4b')/messages/$entity",
"#odata.type": "#microsoft.graph.eventMessage",
"#odata.etag": "W/\"DAA2pU9s\"",
"id": "AAMkADEzOTExYjJkAAA=",
"createdDateTime": "2020-01-24T14:47:24Z",
"lastModifiedDateTime": "2020-01-24T21:08:07Z",
"changeKey": "DApU9s",
"categories": [],
"receivedDateTime": "2020-01-24T14:47:25Z",
"sentDateTime": "2020-01-24T14:47:11Z",
"hasAttachments": false,
"internetMessageId": "<AM5P3M#A38.EURPRD83.prod.outlook.com>",
"subject": "Accepted: Microsoft Graph DevX Roadmap",
"bodyPreview": "",
"importance": "normal",
"parentFolderId": "AAMk3AAA=",
"conversationId": "AAQkADEzOU4=",
"conversationIndex": "AdXReVPepTg==",
"isDeliveryReceiptRequested": null,
"isReadReceiptRequested": false,
"isRead": true,
"isDraft": false,
"webLink": "https://outlook.office365.com/owa/?ItemID=AAMkA%3D&exvsurl=1&viewmodel=ReadMessageItem",
"inferenceClassification": "focused",
"meetingMessageType": "meetingAccepted",
"body": {
"contentType": "text",
"content": ""
},
"sender": {
"emailAddress": {
"name": "Nicole",
"address": "sig#contoso.com"
}
},
"from": {
"emailAddress": {
"name": "Nicole",
"address": "sig#contoso.com"
}
},
"toRecipients": [
{
"emailAddress": {
"name": "Michael Mainer",
"address": "mm#contoso.com"
}
}
],
"ccRecipients": [],
"bccRecipients": [],
"replyTo": [],
"flag": {
"flagStatus": "notFlagged"
}
}