VivaEngagementRoleMember

Parameters

Parameter Attribute DataType Description Allowed Values
Role Key String Name of the engagement role.
Members Write StringArray[] User principal names of the users to assign to the role.
Credential Write PSCredential Credentials of the workload's 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.
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

Manage a Viva Engage roles assigned to a user.

Permissions

Microsoft Graph

To authenticate with the Microsoft Graph API, this resource required the following permissions:

Delegated permissions

  • Read

    • EngagementRole.Read.All
  • Update

    • EngagementRole.ReadWrite.All

Application permissions

  • Read

    • EngagementRole.Read.All
  • Update

    • EngagementRole.ReadWrite.All

Examples

Example 1

This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.

Configuration Example
{
    param(
        [Parameter()]
        [System.String]
        $ApplicationId,

        [Parameter()]
        [System.String]
        $TenantId,

        [Parameter()]
        [System.String]
        $CertificateThumbprint
    )
    Import-DscResource -ModuleName Microsoft365DSC
    node localhost
    {
        VivaEngagementRoleMember "VivaEngagementRoleMember-Network Admin"
        {
            ApplicationId         = $ApplicationId;
            CertificateThumbprint = $CertificateThumbprint;
            Members               = @("admin@contoso.com");
            Role                  = "Network Admin";
            TenantId              = $TenantId;
        }
        VivaEngagementRoleMember "VivaEngagementRoleMember-Verified Admin"
        {
            ApplicationId         = $ApplicationId;
            CertificateThumbprint = $CertificateThumbprint;
            Members               = @("admin@contoso.com","NestorW@M365x73318397.OnMicrosoft.com");
            Role                  = "Verified Admin";
            TenantId              = $TenantId;
        }
        VivaEngagementRoleMember "VivaEngagementRoleMember-Corporate Communicator"
        {
            ApplicationId         = $ApplicationId;
            CertificateThumbprint = $CertificateThumbprint;
            Members               = @("NestorW@contoso.com","AllanD@contoso.com");
            Role                  = "Corporate Communicator";
            TenantId              = $TenantId;
        }
    }
}

Example 2

This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.

Configuration Example
{
    param(
        [Parameter()]
        [System.String]
        $ApplicationId,

        [Parameter()]
        [System.String]
        $TenantId,

        [Parameter()]
        [System.String]
        $CertificateThumbprint
    )
    Import-DscResource -ModuleName Microsoft365DSC
    node localhost
    {
        VivaEngagementRoleMember "VivaEngagementRoleMember-Network Admin"
        {
            ApplicationId         = $ApplicationId;
            CertificateThumbprint = $CertificateThumbprint;
            Members               = @("admin@contoso.com");
            Role                  = "Network Admin";
            TenantId              = $TenantId;
        }
        VivaEngagementRoleMember "VivaEngagementRoleMember-Verified Admin"
        {
            ApplicationId         = $ApplicationId;
            CertificateThumbprint = $CertificateThumbprint;
            Members               = @("admin@contoso.com","NestorW@M365x73318397.OnMicrosoft.com");
            Role                  = "Verified Admin";
            TenantId              = $TenantId;
        }
        VivaEngagementRoleMember "VivaEngagementRoleMember-Corporate Communicator"
        {
            ApplicationId         = $ApplicationId;
            CertificateThumbprint = $CertificateThumbprint;
            Members               = @("NestorW@contoso.com"); #Removed Allan
            Role                  = "Corporate Communicator";
            TenantId              = $TenantId;
        }
    }
}