IntuneRoleAssignmentWindows365¶
Parameters¶
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| AppScopeIds | Write | StringArray[] | Ids of the app specific scopes when the assignment scopes are app specific. The scopes of an assignment determine the set of resources for which the principal has access. | |
| Description | Write | String | Description of the role assignment. | |
| DirectoryScopes | Write | StringArray[] | Display Names of the groups that represent the scopes of the assignment. | |
| DisplayName | Key | String | Name of the role assignment. Required. | |
| Principals | Write | StringArray[] | Display name of the principals to which the assignment is granted. | |
| RoleDefinition | Required | String | Display name of the IntuneRoleDefinitionWindows365 the assignment is for. | |
| Id | Write | String | The unique identifier for an entity. Read-only. | |
| Ensure | Write | String | Present ensures the policy exists, absent ensures it is removed. | Present, Absent |
| Credential | Write | PSCredential | Credentials of the Admin | |
| ApplicationId | Write | String | Id of the Azure Active Directory application to authenticate with. | |
| TenantId | Write | String | Id of the Azure Active Directory tenant used for authentication. | |
| 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¶
Intune Role Assignment Windows365
Please note: Once a Role Assignment is created, the role of the assignment cannot be changed.
If you want to deploy a new assignment with the same name for another role definition, you must first remove the old assignment (Ensure = Absent) and then create a new one with the updated RoleDefinition property.
Permissions¶
Microsoft Graph¶
To authenticate with the Microsoft Graph API, this resource requires the following permissions:
Delegated permissions¶
-
Read
- CloudPC.Read.All, DeviceManagementRBAC.Read.All, Group.Read.All
-
Update
- Group.Read.All
Application permissions¶
-
Read
- CloudPC.Read.All, DeviceManagementRBAC.Read.All, Group.Read.All
-
Update
- Group.Read.All
Examples¶
Example 1¶
This example creates a new Intune Role Assigment.
Configuration Example
{
param(
[Parameter()]
[System.String]
$ApplicationId,
[Parameter()]
[System.String]
$TenantId,
[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC
Node localhost
{
IntuneRoleAssignmentWindows365 "IntuneRoleAssignmentWindows365_1"
{
AppScopeIds = @("0");
Description = "";
DirectoryScopes = @("AADGroup_1");
DisplayName = "IntuneRoleAssignmentWindows365_1";
Ensure = "Present";
Principals = @("AADGroup_1");
RoleDefinition = "IntuneRoleDefinitionWindows365_1";
ApplicationId = $ApplicationId;
CertificateThumbprint = $CertificateThumbprint;
TenantId = $TenantId;
}
}
}
Example 2¶
This example creates a new Intune Role Assigment.
Configuration Example
{
param(
[Parameter()]
[System.String]
$ApplicationId,
[Parameter()]
[System.String]
$TenantId,
[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC
Node localhost
{
IntuneRoleAssignmentWindows365 "IntuneRoleAssignmentWindows365_1"
{
AppScopeIds = @("0");
Description = "";
DirectoryScopes = @("AADGroup_1");
DisplayName = "IntuneRoleAssignmentWindows365_1";
Ensure = "Present";
Principals = @("AADGroup_2"); # Updated property
RoleDefinition = "IntuneRoleDefinitionWindows365_1";
ApplicationId = $ApplicationId;
CertificateThumbprint = $CertificateThumbprint;
TenantId = $TenantId;
}
}
}
Example 3¶
This example creates a new Intune Role Assigment.
Configuration Example
{
param(
[Parameter()]
[System.String]
$ApplicationId,
[Parameter()]
[System.String]
$TenantId,
[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC
Node localhost
{
IntuneRoleAssignmentWindows365 "IntuneRoleAssignmentWindows365_1"
{
DisplayName = "IntuneRoleAssignmentWindows365_1";
RoleDefinition = "IntuneRoleDefinitionWindows365_1";
Ensure = "Absent";
ApplicationId = $ApplicationId;
CertificateThumbprint = $CertificateThumbprint;
TenantId = $TenantId;
}
}
}