Reputation: 113
I'm developing an company app that pulls the data from company's cloud services using Microsoft Graph. At this moment I'm trying to get the list of the company apps using the Graph Intune API which is /deviceAppManagement/mobileApps.
However, it does not return the address of the icon of each of the apps and they are all null. The icons were set in Intune portal and they are displayed properly in Company Portal App. Is there any way that I can have those icons?
Upvotes: 2
Views: 1719
Reputation: 56
@Jason_wun
In summary: If we set the Logo properly we should get the largeIcon with base64 encoded string.
In detail:
First let us verify whether the Logo is uploaded properly. (I'm sure you have done it correctly, because you see it in Company Portal app, but just for the sake of completeness).
Now let's make the GET call to obtain the icon as well as other app related metadata
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceAppManagement/mobileApps/$entity",
"@odata.type": "#microsoft.graph.androidLobApp",
"id": "xxxxxxxx-xxxx-xxxx-GUID-SAMPLExHEREx",
"displayName": "<Display name of your app>",
"description": "<Some description>",
"publisher": "<publisher name>",
"largeIcon": {
"type": "image/png",
"value": "iVBORw0KGgoAAAANSUhEUgAAAHoAAABtCAIAAADh6OKQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAQASURBVHhe7ZzteaswDEY7FwNlnkyTZTJMrw2SLQkbAs19a9L3/CqWP+qDEQX89OubAKFuKNQNhbqhUDcU6oZC3VCoGwp1Q6FuKNQNhbqhUDcU6oZC3VCoGwp1Q6FuKNQN5Uq6H7evzO0hxxfkBd3P+zRPc7o/peSXoG4o1A1l+UV+/df4Ced0Px/327SUJqbp5hQ8U7CE7g8TmttJaGlXozJMGuX5KJ27nle6+wONygndeuzpR/Xib7fbC3eTR3+ggTmpe7o9nnIkGVXCWllWZV6oi4Vip3SjDUWT0Zc6twVNjd2BhuYNuVu0ed1Zg63e6sSXNWq4ngO9gcbmbO5O2VWmq2i4LNpEys6SUbXUrUBXeFB3b6CxeVvuNlLme52UJmaZ/0F3e6CxOa5bHRUJPSklOedIQ2YoO6FbcAONzQu6w2T0UK5etVSlletaQ27x6r0tNizHxtmW7u5AQ7OlW7wKZdLqO1B0y3FBJbTblW6P656Dhosnk6onPseYlJmW2H2uqFLMs8fqDpYbVkvuKeeo7u2BRuWFZELeB3VDoW4o1A2FuqFQNxTqhkLdUKgbCnVDoW4o1A3lKrobL7CuCHVDoW4o1A1lV3dvp9LWRqrls0AykyqF/VDmA4NtIjaXJjpgo4LX7b5WXOILw7ZunWRl+UC1Ls8UFZ3Pa8lIuztjM1bQPte6m4O4szEgm7p1jrLK8mKquvNiEhU6c51sNbEsOHt2Qon4NjWkQunDn+A4RDkd6TqaC/QEjslLund3Ksnkg4u61KKsVcm6QigKFVYj1BpD+97J3WWNJXxynPPmMsGCzn4tY+8EbOhe/PkKJdbAdDEe+7fK7FVmkvCXdkBn+qu6r7y6Cy4/259ngs236PaDhArrEa7BXu4uCUTnmxePmpCYhsrsz+tOhHtpqBDrm79Nlz8hh17cL94qK8ts1HdAbf5It0fthfr9FhfWnSfV2alkM3oq9xupzutOi7V27MaLuhP+SWv5/Wp0SF7N3f+Zls1PhLqhUDcU6oYyiO6/AnVDoW4o1A2FuqFQNxTqhkLdUKgbyp5ufdU69nvNy0DdUKgbyindZqfTl9vrFEL5jf+h/zb18RzXrS/vDPoerxHKaNtO+C9dOod1a4F+k50X6qy72Cz2ta60NrrD998/4/uo7vVqV9SdfWXtyxo1pDvb5qM5qLvlVGieCFdI3dSN5aRuL3WmdSZ8GXUfzt3FtxrKO30nt3jf9d+mPpGjumuJRaKtkHFJ3Sd0J8LeKuvKPMAk3FMOde/rJm+FuqFQNxTqhkLdUKgbCnVDoW4o1A2FuqFQNxTqhkLdUKgbCnVDoW4o1A2FuqFQNxTqhkLdUKgbCnVDoW4g39//AGOcjUiB9dTTAAAAAElFTkSuQmCC"
},
"createdDateTime": "2018-01-09T23:08:32.1089504Z",
"lastModifiedDateTime": "2018-01-09T23:41:37.5000422Z",
"isFeatured": true,
"privacyInformationUrl": null,
"informationUrl": null,
"owner": "",
"developer": "",
"notes": "",
"uploadState": 1,
"committedContentVersion": "2",
"fileName": "<Your app file name>",
"size": 4426224,
"identityVersion": "103185025",
"identityName": "<reversed domain name type>",
"minimumSupportedOperatingSystem": {
"v4_0": true,
"v4_0_3": false,
"v4_1": false,
"v4_2": false,
"v4_3": false,
"v4_4": false,
"v5_0": false,
"v5_1": false
},
"versionName": "10.3.185.25",
"versionCode": "103185025"
}
In summary to obtain the image we need to decode the base64 encoded value of largeIcon.
On a side note: If you want to get the icon information only (excluding the other app metadata the following call might be helpful.
https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/<GUID of the app's Id here>?$select=largeIcon
Upvotes: 1