microsoft / Microsoft365DSC

Manages, configures, extracts and monitors Microsoft 365 tenant configurations
https://aka.ms/M365DSC
MIT License
1.64k stars 503 forks source link

IntuneMobileAppConfigurationPolicyIOS is not needed #5459

Open ricmestre opened 3 days ago

ricmestre commented 3 days ago

Description of the issue

IntuneMobileAppConfigurationPolicyIOS is not needed, this resource is already covered by IntuneAppConfigurationDevicePolicy which takes care of both Android and iOS.

Microsoft 365 DSC Version

1.24.1120.1

Which workloads are affected

Intune

The DSC configuration

N/A

Verbose logs showing the problem

N/A

Environment Information + PowerShell Version

Win11/PS5.1
NikCharlebois commented 2 days ago

@ykuijs FYI.

ykuijs commented 2 days ago

This was new resource was submitted by @dannyKBjj and merged last week in PR #5401.

@dannyKBjj, were you aware of the resource @ricmestre is mentioning and that is was capable of also managing the iOS policies?

If this is a duplicate, we will have to remove the newly added resource again. Working on a PR now and will include this rollback in that PR.

dannyKBjj commented 2 days ago

Are you sure? Because I was testing with what I believed to be the latest release and it was not exporting those policies (hence my creating the module), there are Managed App policies (which might be what this existing module does) and managed device policy which targets the apps (which is what mine does).... I.e. within Intune GUi - Apps>App Configuration Policies > create > managed devices... Which despite the name brings you 'Create App Configuration Policy' (for managed devices, rather than managed apps)

dannyKBjj commented 2 days ago

Unless this other module was in a very recent release (like within last month, as I can't say I've been religiously updating since downloading the module) I don't think it is anything to do with mine.

ricmestre commented 2 days ago

@dannyKBjj See below, I'm able to export the same policy Apple iOS - Outlook Configuration Profile using both DSC resources, difference is that IntuneAppConfigurationDevicePolicy also works for Android policies.

Image

EDIT: And yes both policies are Managed devices policies

ricmestre commented 2 days ago

@dannyKBjj IntuneAppConfigurationDevicePolicy has been made available back in May in version 1.24.529.1

dannyKBjj commented 2 days ago

Fair enough, I have submitted another module to support Android which was also accepted (but is not in latest release). I guess that is also redundant and will need removing (IntuneAndroidManagedStoreAppConfiguration).

ricmestre commented 2 days ago

Yep, just looked at your code and IntuneAndroidManagedStoreAppConfiguration is also duplicate, I'm not even saying which way is better, but since there's already an older version available for several months that's the one that we should use.

dannyKBjj commented 2 days ago

I'm about to submit a load more modules for things I don't think are exporting, I will make sure i'm on latest version and do a re-export of everything from my tenant to double check before I do.

ykuijs commented 19 hours ago

Yep, just looked at your code and IntuneAndroidManagedStoreAppConfiguration is also duplicate, I'm not even saying which way is better, but since there's already an older version available for several months that's the one that we should use.

Agree with that. If the older one has issue, we should fix them. If things are missing, these should be added.

Which resource is the IntuneAndroidManagedStoreAppConfiguration overlapping with?

dannyKBjj commented 18 hours ago

Seems to duplicate the functionality of MSFT_IntuneAppConfigurationDevicePolicy , unsure how or why it was missed as we weren't using a particularly old module version... we created export command line from https://export.microsoft365dsc.com/ by selecting all the Intune options. Have just tried this myself and it includes that module in the list of components so unsure why it wasn't captured. I guess maybe there's some delay between module releases and that tool being updated? Have just created a script to dynamically discover what's available in the DSCResources folder instead.

FabienTschanz commented 15 hours ago

@ricmestre The resource is now removed, the issue can be closed.

ricmestre commented 13 hours ago

@ykuijs @FabienTschanz Like I explained IntuneAppConfigurationDevicePolicy covers both iOS and Android so now that IntuneMobileAppConfigurationPolicyIOS has been removed IntuneAndroidManagedStoreAppConfiguration must also be removed.

ykuijs commented 5 hours ago

Will still have to remove the IntuneAndroidManagedStoreAppConfiguration resource. Will create a PR for that shortly and link this issue, so it will automatically close when the PR is merged