IntuneDeviceAndAppManagementAssignmentFilter¶
Parameters¶
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
DisplayName | Key | String | DisplayName of the Assignment Filter. | |
Identity | Write | String | Key of the Assignment Filter. | |
Description | Write | String | Description of the Assignment Filter. | |
AssignmentFilterManagementType | Write | String | Indicates filter is applied to either 'devices' or 'apps' management type. Default is 'devices'. | apps , devices |
Platform | Write | String | Platform type of the devices on which the Assignment Filter will be applicable. | android , androidForWork , iOS , macOS , windowsPhone81 , windows81AndLater , windows10AndLater , androidWorkProfile , unknown , androidAOSP , androidMobileApplicationManagement , iOSMobileApplicationManagement , unknownFutureValue |
Rule | Write | String | Rule definition of the Assignment Filter. | |
Ensure | Write | String | Present ensures the policy exists, absent ensures it is removed | Present , Absent |
Credential | Write | PSCredential | Credentials of the Intune Admin | |
ApplicationId | Write | String | Id of the Azure Active Directory application to authenticate with. | |
TenantId | Write | String | Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com | |
ApplicationSecret | Write | PSCredential | Secret of the Azure Active Directory tenant used for authentication. | |
CertificateThumbprint | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | |
ManagedIdentity | Write | Boolean | Managed ID being used for authentication. | |
AccessTokens | Write | StringArray[] | Access token used for authentication. |
Description¶
This resource represents the properties of the Intune Assignment Filter. For more information: https://docs.microsoft.com/en-us/graph/api/resources/intune-policyset-deviceandappmanagementassignmentfilter?view=graph-rest-beta
Please note: After creating a filter, it is not possible to update the AssignmentFilterManagementType
property. You have to remove and recreate the filter to update it.
Permissions¶
Microsoft Graph¶
To authenticate with the Microsoft Graph API, this resource required the following permissions:
Delegated permissions¶
-
Read
- DeviceManagementConfiguration.Read.All
-
Update
- DeviceManagementConfiguration.ReadWrite.All
Application permissions¶
-
Read
- DeviceManagementConfiguration.Read.All
-
Update
- DeviceManagementConfiguration.ReadWrite.All
Examples¶
Example 1¶
This example creates a new Device and App Management Assignment Filter.
Configuration Example
{
param(
[Parameter()]
[System.String]
$ApplicationId,
[Parameter()]
[System.String]
$TenantId,
[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC
node localhost
{
IntuneDeviceAndAppManagementAssignmentFilter 'AssignmentFilter'
{
DisplayName = 'Test Device Filter'
Description = 'This is a new Filter'
AssignmentFilterManagementType = 'devices'
Platform = 'windows10AndLater'
Rule = "(device.manufacturer -ne `"Microsoft Corporation`")"
Ensure = 'Present'
ApplicationId = $ApplicationId;
TenantId = $TenantId;
CertificateThumbprint = $CertificateThumbprint;
}
}
}
Example 2¶
This example creates a new Device and App Management Assignment Filter.
Configuration Example
{
param(
[Parameter()]
[System.String]
$ApplicationId,
[Parameter()]
[System.String]
$TenantId,
[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC
node localhost
{
IntuneDeviceAndAppManagementAssignmentFilter 'AssignmentFilter'
{
DisplayName = 'Test Device Filter'
Description = 'This is a new Filter'
AssignmentFilterManagementType = 'devices'
Platform = 'windows10AndLater'
Rule = "(device.manufacturer -ne `"Apple`")" # Updated Property
Ensure = 'Present'
ApplicationId = $ApplicationId;
TenantId = $TenantId;
CertificateThumbprint = $CertificateThumbprint;
}
}
}
Example 3¶
This example creates a new Device and App Management Assignment Filter.
Configuration Example
{
param(
[Parameter()]
[System.String]
$ApplicationId,
[Parameter()]
[System.String]
$TenantId,
[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC
node localhost
{
IntuneDeviceAndAppManagementAssignmentFilter 'AssignmentFilter'
{
DisplayName = 'Test Device Filter'
Ensure = 'Absent'
ApplicationId = $ApplicationId;
TenantId = $TenantId;
CertificateThumbprint = $CertificateThumbprint;
}
}
}