Home
%3CLINGO-SUB%20id%3D%22lingo-sub-377266%22%20slang%3D%22en-US%22%3EApplication%20Publishing%20Automation%20in%20Microsoft%20Intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-377266%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EFirst%20published%20on%20TECHNET%20on%20Jul%2027%2C%202018%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3EIn%20this%20post%20we%20will%20discuss%20how%20we%20automated%20the%20publishing%20of%20internal%20line-of-business%20(LOB)%20applications%20to%20enrolled%20devices%20using%20Microsoft%20Intune.%20This%20is%20production%20automation%20that%20runs%20in%20the%20Microsoft%20environment%20to%20publish%20%2F%20upgrade%20LOB%20Applications%20in%20our%20Intune%20tenant.%20We%20have%20had%20long%20standing%20automation%20that%20publishes%20LOB%20applications%20through%20Configuration%20Manager%20and%20since%20we%20had%20the%20Intune%20connector%20configured%2C%20MDM%20enrolled%20devices%20were%20able%20to%20download%20applications%20through%20Company%20Portal.%20Now%20that%20we%20have%20migrated%20to%20an%20Intune%20stand%20alone%20environment%2C%20we%20maintain%20separate%20application%20publishing%20workflows%20through%20Configuration%20Manager%20and%20Intune.%20This%20post%20will%20aim%20to%20explain%20how%20you%20can%20automate%20an%20application%20publishing%20workflow%20through%20Intune%20using%20Microsoft%20Graph.%20A%20sample%20of%20the%20code%20can%20be%20found%20on%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fpowershell-intune-samples%2Ftree%2Fmaster%2FLOB_Application%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20GitHub%20here.%20%3C%2FA%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1679885599%22%20id%3D%22toc-hId-1710360859%22%3EScenario%3C%2FH2%3E%0A%3CP%3E%3CBR%20%2F%3EIn%20order%20to%20understand%20our%20production%20automation%20end%20to%20end%20we%20have%20to%20start%20with%20how%20an%20application%20request%20gets%20to%20us%20for%20publishing.%20We%20have%20an%20internal%20process%20where%20application%20publishers%20can%20request%20that%20their%20application%20be%20published%20internally.%20This%20will%20generate%20an%20XML%20file%20that%20contains%20relevant%20metadata%20about%20that%20application%20that%20we%20will%20then%20use%20for%20publishing.%20Relevant%20details%20include%20type%20of%20application%2C%20title%2C%20description%2C%20location%20to%20application%20files%20and%20other%20relevant%20details.%20Currently%2C%20we%20have%20over%20200%20internal%20production%20LOB%20applications%20published%20for%20MDM%20devices%20and%20we%20go%20through%20multiple%20updates%20%2F%20upgrades%20for%20each%20one%20of%20these%20applications.%20Since%20there%20are%20hundreds%20of%20LOB%20apps%20in%20our%20environment%20that%20go%20through%20multiple%20changes%2C%20it%20is%20necessary%20to%20run%20this%20automation%20since%20it%20would%20be%20very%20difficult%20for%20Admins%20to%20keep%20up%20with%20the%20amount%20of%20work%20generated%20from%20these%20requests.%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--872271362%22%20id%3D%22toc-hId--841796102%22%3ESolution%3C%2FH2%3E%0A%3CP%3E%3CBR%20%2F%3EAutomated%20workflows%20in%20Intune%20can%20be%20accomplished%20by%20utilizing%20the%20Intune%20Graph%20API.%20In%20our%20automation%20we%20are%20utilizing%20PowerShell%20to%20make%20requests%20to%20the%20Intune%20Graph%20API%20for%20App%20Management%3A%3CCODE%3E%0A%20%20%20%2FdeviceAppManagement%2FmobileApps%0A%20%20%3C%2FCODE%3E%20.%20One%20important%20concept%20to%20understand%20is%20the%20Microsoft%20Graph%20permissions%20necessary.%20There%20are%20two%20types%20of%20permissions%2C%20delegated%20and%20application.%20For%20more%20information%20review%20the%20following%20%3CA%20href%3D%22https%3A%2F%2Fdeveloper.microsoft.com%2Fen-us%2Fgraph%2Fdocs%2Fconcepts%2Fpermissions_reference%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20link.%20%3C%2FA%3E%20In%20the%20case%20of%20the%20API%E2%80%99s%20we%20are%20utilizing%20for%20App%20Management%2C%20at%20the%20time%20of%20this%20writing%2C%20we%20need%20to%20utilize%20delegated%20permissions.%20This%20involves%20creating%20an%20Azure%20AD%20Application%20that%20has%20the%20proper%20permissions%20to%20the%20Microsoft%20Graph%20Intune%20APIs.%20Once%20we%20have%20an%20Azure%20AD%20App%2C%20we%20can%20utilize%20a%20service%20account%20that%20has%20the%20Application%20Manager%20RBAC%20role%20applied%20within%20Intune.%20The%20effective%20permissions%20of%20our%20automation%20are%20the%20least%20privileged%20intersection%20of%20the%20delegated%20permissions%20the%20Azure%20AD%20app%20has%20been%20granted%20and%20the%20privileges%20of%20the%20currently%20signed-in%20user%2C%20which%20is%20our%20service%20account.%20Even%20though%20our%20Azure%20AD%20App%20has%20all%20Intune%20Graph%20API%20permissions%20granted%2C%20our%20application%20workflow%20automation%20can%20never%20have%20more%20privileges%20then%20the%20limited%20Application%20Manager%20RBAC%20role%20that%20we%20assigned%20in%20Intune%20to%20our%20service%20account.%20%3CBR%20%2F%3E%3CBR%20%2F%3ETo%20demonstrate%20this%2C%20here%20are%20the%20steps%20that%20we%20use.%20First%20we%20pull%20our%20service%20account's%20credentials%20from%20KeyVault%20using%20a%20Service%20Principal.%20Once%20we%20have%20that%2C%20we%20can%20use%20the%20standard%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fpowershell-intune-samples%2Ftree%2Fmaster%2FAuthentication%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Get-AuthToken%20%3C%2FA%3E%20function%20supplying%20the%20user%20name%20and%20password%20for%20our%20service%20account.%20We%20updated%20the%20function%20with%20our%20Azure%20AD%20App%20ID%20in%20the%20%3CCODE%3E%0A%20%20%20%24clientId%0A%20%20%3C%2FCODE%3E%20variable.%20This%20will%20generate%20our%20delegated%20permissions%20auth%20token%20that%20we%20can%20then%20use%20in%20our%20requests%20when%20publishing%20applications%20within%20our%20Intune%20tenant.%20%3CBR%20%2F%3E%3CBR%20%2F%3ENow%20that%20we%20have%20successfully%20authenticated%2C%20we%20can%20begin%20utilizing%20the%20Intune%20App%20Management%20APIs.%20First%20we%20start%20by%20parsing%20the%20XML%20we%20receive%20for%20an%20application%20publishing%20request.%20For%20each%20application%20type%20(iOS%2C%20Android%2C%20Windows)%20we%20have%20specific%20PowerShell%20functions%20that%20will%20handle%20the%20publishing.%20This%20is%20necessary%20because%20for%20each%20type%2C%20in%20order%20to%20publish%20to%20Intune%2C%20specific%20app%20metdata%20needs%20to%20be%20extracted%20from%20the%20application%20files.%20In%20the%20case%20of%20iOS%2C%20we%20need%20to%20parse%20Info.plist%2C%20for%20Android%20we%20need%20the%20AndroidManifest.XML%20and%20finally%20for%20Windows%2C%20the%20AppxManifest.xml.%20In%20the%20case%20of%20iOS%20we%20use%20the%20plutil.exe%20from%20Apple%20with%20the%20following%20options%20%3CCODE%3E%0A%20%20%20-convert%20xml1%20plistFile%0A%20%20%3C%2FCODE%3E%20to%20convert%20the%20Info.plist%20into%20an%20XML%20file.%20We%20can%20then%20extract%20the%20necessary%20metadata%20needed%20in%20Intune%20for%20publishing%20(CFBundleVersion%2C%20CFBundleIdentifier%20etc).%20For%20Android%2C%20we%20utilize%20aapt.exe%20from%20the%20Android%20SDK%20with%20the%20following%20options%20%3CCODE%3E%0A%20%20%20dump%20xmltree%20apkFill%0A%20%20%3C%2FCODE%3E%20in%20order%20to%20generate%20the%20XML.%20Finally%2C%20for%20Windows%2C%20since%20an%20Appx%2F%20AppxBundle%20file%20is%20an%20archive%20directory%20we%20can%20unzip%20the%20app%20file%20and%20extract%20just%20the%20appxManifest.xml%20file.%20In%20the%20case%20of%20an%20AppxBundle%2C%20we%20loop%20through%20each%20Appx%20folder%20and%20extract%20the%20relevant%20AppxManfiest.xml%20contained%20within%20the%20bundle.%20We%20then%20look%20at%20each%20AppxManifest.xml%20and%20determine%20the%20appropriate%20metadata%20for%20the%20AppxBundle.%20This%20is%20the%20first%20part%20of%20the%20process%20where%20we%20extract%20all%20the%20relevant%20metadata%20from%20the%20files%20that%20we%20wish%20to%20upload%20to%20the%20Intune%20service.%20%3CBR%20%2F%3E%3CBR%20%2F%3EOnce%20we%20have%20the%20necessary%20metadata%2C%20we%20can%20create%20%2F%20upgrade%20the%20LOB%20Application%20within%20the%20Intune%20service.%20By%20sending%20a%20POST%20request%20with%20the%20app%20metadata%20as%20JSON%2C%20we%20create%20a%20new%20application.%20If%20this%20is%20an%20upgrade%20to%20an%20existing%20App%2C%20then%20we%20go%20through%20the%20below%20steps%20to%20the%20existing%20AppID%20in%20Intune.%20The%20endpoint%20that%20we%20use%20is%20%3CCODE%3E%0A%20%20%20%2FdeviceAppManagement%2FmobileApps%0A%20%20%3C%2FCODE%3E%20.%20A%20sample%20JSON%20metadata%20for%20new%20Adroid%20app%20may%20look%20like%20this%20%3CBR%20%2F%3E%3CCODE%3E%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%7B%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22owner%22%3A%20%20%22%22%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22fileName%22%3A%20%20%22A_Online_Radio_1.0.5.4.apk%22%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22description%22%3A%20%20%22A%20Online%20Radio%201.0.5.4%22%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22categories%22%3A%20%5B%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%5D%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22displayName%22%3A%20%20%22A_Online_Radio_1.0.5.4.apk%22%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22minimumSupportedOperatingSystem%22%3A%20%7B%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22v4_0%22%3A%20%20true%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%7D%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22%40odata.type%22%3A%20%20%22%23microsoft.graph.androidLOBApp%22%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22identityVersion%22%3A%20%20%2210%22%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22privacyInformationUrl%22%3A%20%20null%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22notes%22%3A%20%20%22%22%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22informationUrl%22%3A%20%20null%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22developer%22%3A%20%20%22%22%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22publisher%22%3A%20%20%22A%20Online%20Radio%22%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22identityName%22%3A%20%20%22com.leadapps.android.radio.ncp%22%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22isFeatured%22%3A%20%20false%2C%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%22VersionName%22%3A%20%221.0.5.4%22%0A%20%20%20%3CBR%20%2F%3E%0A%20%20%20%7D%0A%20%20%3C%2FCODE%3E%20.%20%3CBR%20%2F%3E%3CBR%20%2F%3EFor%20this%20new%20or%20existing%20app%20object%20we%20then%20need%20a%20place%20we%20can%20store%20files.%20So%20we%20create%20a%20new%20content%20version%20for%20the%20application%20ID%20returned%20by%20the%20above%20POST%20request%2C%20then%20wait%20for%20an%20Azure%20storage%20URI%20to%20be%20generated.%20We%20do%20this%20by%20sending%20a%20POST%20request%20to%20the%20following%20URL%20once%20our%20app%20has%20been%20created%20%3CCODE%3E%0A%20%20%20deviceAppManagement%2FmobileApps%2FApplicationId%2FLOBType%2FcontentVersions%0A%20%20%3C%2FCODE%3E%20.%20%3CBR%20%2F%3E%3CBR%20%2F%3EOnce%20we%20have%20this%2C%20we%20can%20encrypt%20our%20LOB%20application%20files%20and%20upload%20to%20Azure%20storage.%20When%20uploading%20files%20to%20the%20service%20we%20need%20to%20get%20information%20about%20the%20files%20and%20generate%20a%20file%20type%20that%20is%20suitable%20for%20upload.%20A%20.bin%20file%20is%20created%20then%20encrypted.%20We%20then%20provide%20information%20about%20the%20file%2C%20sizeEncrypted%2C%20size%2C%20manifest%2C%20name%20and%20%40odata.type.%20This%20is%20explained%20further%20in%20the%20Readme.md%20file%20on%20GitHub.%20If%20we%20are%20uploading%20a%20Windows%20App%20with%20dependencies%2C%20then%20we%20must%20handle%20the%20upload%20of%20all%20dependencies%20as%20well.%20In%20our%20automation%2C%20we%20loop%20through%20all%20the%20dependency%20files%2C%20create%20the%20relevant%20dependency%20manifests%2C%20and%20upload%20relevant%20files%20to%20the%20Azure%20storage%20URI.%20%3CBR%20%2F%3E%3CBR%20%2F%3EOnce%20completed%2C%20we%20commit%20all%20the%20files%20in%20the%20Intune%20service%20and%20our%20application%20is%20created%20and%20ready%20to%20be%20assigned.%20%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20final%20steps%20in%20our%20automation%20are%20to%20assign%20the%20application%20to%20an%20AAD%20security%20group%20and%20report%20back%20the%20status%20of%20publishing%20and%20any%20failures%20that%20may%20have%20happened.%20In%20order%20to%20assign%20the%20application%2C%20a%20sample%20function%20%3CCODE%3E%0A%20%20%20Add-ApplicationAssignment%0A%20%20%3C%2FCODE%3E%20is%20available%20under%20the%20powershell-intune-samples%20%2F%20Applications%20folder.%20This%20will%20assign%20the%20application%20to%20the%20AAD%20security%20group%20ID%20with%20the%20relevant%20intent%20(available%20or%20required).%20Once%20the%20app%20is%20assigned%20users%20targeted%20will%20be%20able%20to%20see%20the%20application%20within%20Company%20Portal%20and%20install.%20%3CBR%20%2F%3E%3CBR%20%2F%3EAfter%20our%20workflow%20runs%2C%20we%20report%20back%20and%20notify%20the%20application%20owner%20that%20their%20application%20has%20successfully%20been%20created%20and%20assigned.%20This%20high%20level%20diagram%20is%20an%20outline%20of%20how%20our%20automation%20runs%3A%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20554px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F93857iDA444510B0B2FD26%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EOverview%20of%20Intune%20App%20publishing%20workflow%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-870538973%22%20id%3D%22toc-hId-901014233%22%3EKey%20Benefits%20%26amp%3B%20Takeaways%3C%2FH2%3E%0A%3CP%3E%3CBR%20%2F%3EDue%20to%20the%20volume%20of%20changes%20in%20our%20Application%20space%2C%20automation%20is%20necessary%20to%20reduce%20the%20amount%20of%20work%20for%20Admins.%20By%20implementing%20this%20automation%20we%20have%20a%200%20touch%20solution%20for%20creating%20%2F%20maintaining%20LOB%20applications%20in%20our%20Intune%20environment.%20This%20has%20significantly%20improved%20our%20efficency%20in%20maintaing%20our%20LOB%20Apps%20in%20Intune%20in%20addition%20to%20decreasing%20the%20amount%20of%20time%20it%20takes%20for%20requestors%20to%20have%20their%20internal%20LOB%20App%20published%20%2F%20upgraded.%20Thank%20you%20for%20reading!%20Hopefully%20this%20post%20has%20helped%20you%20better%20understand%20how%20workflows%20can%20be%20automated%20in%20Intune%20and%20how%20it%20has%20helped%20keep%20the%20Microsoft%20environment%20in%20sync%20for%20LOB%20Apps%20published%20in%20Intune.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-377266%22%20slang%3D%22en-US%22%3E%3CP%3EFirst%20published%20on%20TECHNET%20on%20Jul%2027%2C%202018%20In%20this%20post%20we%20will%20discuss%20how%20we%20automated%20the%20publishing%20of%20internal%20line-of-business%20(LOB)%20applications%20to%20enrolled%20devices%20using%20Microsoft%20Intune.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-377266%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApplication%20management%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Graph%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESCCM%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ewindows%20intune%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

First published on TECHNET on Jul 27, 2018
In this post we will discuss how we automated the publishing of internal line-of-business (LOB) applications to enrolled devices using Microsoft Intune. This is production automation that runs in the Microsoft environment to publish / upgrade LOB Applications in our Intune tenant. We have had long standing automation that publishes LOB applications through Configuration Manager and since we had the Intune connector configured, MDM enrolled devices were able to download applications through Company Portal. Now that we have migrated to an Intune stand alone environment, we maintain separate application publishing workflows through Configuration Manager and Intune. This post will aim to explain how you can automate an application publishing workflow through Intune using Microsoft Graph. A sample of the code can be found on GitHub here.

Scenario


In order to understand our production automation end to end we have to start with how an application request gets to us for publishing. We have an internal process where application publishers can request that their application be published internally. This will generate an XML file that contains relevant metadata about that application that we will then use for publishing. Relevant details include type of application, title, description, location to application files and other relevant details. Currently, we have over 200 internal production LOB applications published for MDM devices and we go through multiple updates / upgrades for each one of these applications. Since there are hundreds of LOB apps in our environment that go through multiple changes, it is necessary to run this automation since it would be very difficult for Admins to keep up with the amount of work generated from these requests.

Solution


Automated workflows in Intune can be accomplished by utilizing the Intune Graph API. In our automation we are utilizing PowerShell to make requests to the Intune Graph API for App Management: /deviceAppManagement/mobileApps . One important concept to understand is the Microsoft Graph permissions necessary. There are two types of permissions, delegated and application. For more information review the following link. In the case of the API’s we are utilizing for App Management, at the time of this writing, we need to utilize delegated permissions. This involves creating an Azure AD Application that has the proper permissions to the Microsoft Graph Intune APIs. Once we have an Azure AD App, we can utilize a service account that has the Application Manager RBAC role applied within Intune. The effective permissions of our automation are the least privileged intersection of the delegated permissions the Azure AD app has been granted and the privileges of the currently signed-in user, which is our service account. Even though our Azure AD App has all Intune Graph API permissions granted, our application workflow automation can never have more privileges then the limited Application Manager RBAC role that we assigned in Intune to our service account.

To demonstrate this, here are the steps that we use. First we pull our service account's credentials from KeyVault using a Service Principal. Once we have that, we can use the standard Get-AuthToken function supplying the user name and password for our service account. We updated the function with our Azure AD App ID in the $clientId variable. This will generate our delegated permissions auth token that we can then use in our requests when publishing applications within our Intune tenant.

Now that we have successfully authenticated, we can begin utilizing the Intune App Management APIs. First we start by parsing the XML we receive for an application publishing request. For each application type (iOS, Android, Windows) we have specific PowerShell functions that will handle the publishing. This is necessary because for each type, in order to publish to Intune, specific app metdata needs to be extracted from the application files. In the case of iOS, we need to parse Info.plist, for Android we need the AndroidManifest.XML and finally for Windows, the AppxManifest.xml. In the case of iOS we use the plutil.exe from Apple with the following options -convert xml1 plistFile to convert the Info.plist into an XML file. We can then extract the necessary metadata needed in Intune for publishing (CFBundleVersion, CFBundleIdentifier etc). For Android, we utilize aapt.exe from the Android SDK with the following options dump xmltree apkFill in order to generate the XML. Finally, for Windows, since an Appx/ AppxBundle file is an archive directory we can unzip the app file and extract just the appxManifest.xml file. In the case of an AppxBundle, we loop through each Appx folder and extract the relevant AppxManfiest.xml contained within the bundle. We then look at each AppxManifest.xml and determine the appropriate metadata for the AppxBundle. This is the first part of the process where we extract all the relevant metadata from the files that we wish to upload to the Intune service.

Once we have the necessary metadata, we can create / upgrade the LOB Application within the Intune service. By sending a POST request with the app metadata as JSON, we create a new application. If this is an upgrade to an existing App, then we go through the below steps to the existing AppID in Intune. The endpoint that we use is /deviceAppManagement/mobileApps . A sample JSON metadata for new Adroid app may look like this

{

"owner": "",
"fileName": "A_Online_Radio_1.0.5.4.apk",
"description": "A Online Radio 1.0.5.4",
"categories": [

],
"displayName": "A_Online_Radio_1.0.5.4.apk",
"minimumSupportedOperatingSystem": {
"v4_0": true
},
"@odata.type": "#microsoft.graph.androidLOBApp",
"identityVersion": "10",
"privacyInformationUrl": null,
"notes": "",
"informationUrl": null,
"developer": "",
"publisher": "A Online Radio",
"identityName": "com.leadapps.android.radio.ncp",
"isFeatured": false,
"VersionName": "1.0.5.4"
}
.

For this new or existing app object we then need a place we can store files. So we create a new content version for the application ID returned by the above POST request, then wait for an Azure storage URI to be generated. We do this by sending a POST request to the following URL once our app has been created deviceAppManagement/mobileApps/ApplicationId/LOBType/contentVersions .

Once we have this, we can encrypt our LOB application files and upload to Azure storage. When uploading files to the service we need to get information about the files and generate a file type that is suitable for upload. A .bin file is created then encrypted. We then provide information about the file, sizeEncrypted, size, manifest, name and @odata.type. This is explained further in the Readme.md file on GitHub. If we are uploading a Windows App with dependencies, then we must handle the upload of all dependencies as well. In our automation, we loop through all the dependency files, create the relevant dependency manifests, and upload relevant files to the Azure storage URI.

Once completed, we commit all the files in the Intune service and our application is created and ready to be assigned.

The final steps in our automation are to assign the application to an AAD security group and report back the status of publishing and any failures that may have happened. In order to assign the application, a sample function Add-ApplicationAssignment is available under the powershell-intune-samples / Applications folder. This will assign the application to the AAD security group ID with the relevant intent (available or required). Once the app is assigned users targeted will be able to see the application within Company Portal and install.

After our workflow runs, we report back and notify the application owner that their application has successfully been created and assigned. This high level diagram is an outline of how our automation runs:

Overview of Intune App publishing workflow

Key Benefits & Takeaways


Due to the volume of changes in our Application space, automation is necessary to reduce the amount of work for Admins. By implementing this automation we have a 0 touch solution for creating / maintaining LOB applications in our Intune environment. This has significantly improved our efficency in maintaing our LOB Apps in Intune in addition to decreasing the amount of time it takes for requestors to have their internal LOB App published / upgraded. Thank you for reading! Hopefully this post has helped you better understand how workflows can be automated in Intune and how it has helped keep the Microsoft environment in sync for LOB Apps published in Intune.