Controllare Viva Engage utenti in reti connesse a Microsoft 365

La rete Viva Engage dell'azienda potrebbe avere utenti che non lavorano più per l'azienda. In alternativa, alcuni utenti Viva Engage potrebbero accedere con la posta elettronica e la password perché non hanno un account Microsoft 365 corrispondente. Per analizzare tali situazioni e intervenire, è possibile controllare gli utenti Viva Engage. Ciò comporta l'esportazione dell'elenco di utenti Viva Engage, la ricerca dello stato di questi utenti Viva Engage in Microsoft 365 tramite il modulo Azure Active Directory per Windows PowerShell e l'analisi dei risultati e l'esecuzione di azioni.

Oltre al controllo Viva Engage utenti, è possibile comprendere meglio come il servizio Viva Engage può essere gestito senza problemi da Microsoft 365. Per informazioni dettagliate, vedere Applicare l'identità di Microsoft 365 per gli utenti Viva Engage.

Esportare l'elenco Viva Engage utenti

Prima di eseguire lo script di controllo, creare un file di input contenente l'elenco di account utente da usare per lo script. È possibile creare il file di input usando la funzione Esporta utenti in Viva Engage.

  1. In Viva Engage selezionare l'icona delle impostazioni Viva Engage e quindi selezionare Rete Amministrazione.

  2. Selezionare Esporta utenti.

  3. Nella pagina Esporta utenti scegliere Esporta tutti gli utenti e quindi selezionare Esporta.

  4. Salvare il file esportato. Il file viene salvato come file compresso con un'estensione di file .zip.

  5. Passare al percorso in cui è stato salvato il file compresso e decomprimerlo.

Nota

All'interno del file compresso sono contenuti diversi file. È necessario solo il file denominato users.csv.

Trovare lo stato degli utenti Viva Engage in Microsoft 365

  1. Installare e configurare il modulo Azure Active Directory per Windows PowerShell. Per istruzioni su questo argomento, leggere il documento seguente: Microsoft Entra ID Guida.

  2. Copiare il codice di esempio seguente, incollarlo in un editor di testo come Blocco note e quindi salvare il file come UserMatchToAzureAD.ps1.

    È possibile modificarlo in base alle esigenze dell'organizzazione.

     <#Copyright 2016  Microsoft Licensed under the Apache License, Version 2.0 (the "License");  you may not use this file except in compliance with the License.  You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software  distributed under the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions  and limitations under the License.  Viva Engage auditing tool for Office 365 looks for active Viva Engage accounts  that  are missing from Office 365 / Azure AD.  Takes User.csv file from Viva Engage Data Export as the input file.   Compares all Active Viva Engage accounts in the input file to user   lookup in Azure AD. User is searched by both email and proxyAddresses.   The output csv file is exactly matching the source file, but it includes  three new columns: exists_in_azure_ad, object_id and azure_licenses:  exists_in_azure_ad: Will be TRUE or FALSE, and signals that the user can be, or cannot be found in Office 365 / Azure AD  object_id: For users that can be found, lists the ObjectId in Azure AD  azure_licenses: For users that can be found, lists the plans assigned to the user in Azure AD. 
    
     azurepowershell
    
     This information can be used to double check licenses are assigned correctly for each user.  
    
     azurepowershell
    
     Params -  UseExistingConnection: Defines if the script should try to use an existing Azure AD connection. Will prompt for credentials and will start a new connection if $FALSE. Default is $FALSE  InputFile: Source CSV file of users, coming from the Viva Engage User Export tool  OutputFile: Output location to save the final CSV to  Example -  UserMatchToAzureAD.ps1 -InputFile .\Users.csv -OutputFile .\Results.csv  #> 
    
     azurepowershell
    
     Param(
     	 [bool]$UseExistingConnection = $FALSE,
     	 [string]$InputFile = ".\Users.csv",
     	 [string]$Outputfile = ".\Results.csv"
     	) 
       if(!$UseExistingConnection){
     	   Write-Host "Creating a new connection. Login with your Office 365 Global Admin Credentials..."
     	   $msolcred = get-credential
     	   connect-msolservice -credential $msolcred
        }
        Write-Host "Loading all Office 365 users from Azure AD. This can take a while depending on the number of users..."
        $o365usershash = @{}
        get-msoluser -All | Select userprincipalname,proxyaddresses,objectid,@{Name="licenses";Expression={$_.Licenses.AccountplanId}} | ForEach-Object {
     	   $o365usershash.Add($_.userprincipalname.ToUpperInvariant(), $_)
     	   $_.proxyaddresses | ForEach-Object {
     		   $email = ($_.ToUpperInvariant() -Replace "SMTP:(\\*)*", "").Trim()
     		   if(!$o365usershash.Contains($email))
     		   {
     			   $o365usershash.Add($email, $_)
     		   }
     	   }
        }
        Write-Host "Matching Viva Engage users to Office 365 users"
        $yammerusers = Import-Csv -Path $InputFile | Where-Object {$_.state -eq "active"}
        $yammerusers | ForEach-Object {
     	   $o365user = $o365usershash[$_.email.ToUpperInvariant()]
     	   $exists_in_azure_ad = ($o365user -ne $Null)
     	   $objectid = if($exists_in_azure_ad) { $o365user.objectid } else { "" }
     	   $licenses = if($exists_in_azure_ad) { $o365user.licenses } else { "" }
     	   $_ | Add-Member -MemberType NoteProperty -Name "exists_in_azure_ad" -Value $exists_in_azure_ad
     	   $_ | Add-Member -MemberType NoteProperty -Name "azure_object_id" -Value $objectid
     	   $_ | Add-Member -MemberType NoteProperty -Name "azure_licenses" -Value $licenses
        } 
       Write-Host "Writing the output csv file..."
       $yammerusers | Export-Csv $Outputfile -NoTypeInformation 
       Write-Host "Done." 
    
  3. Da un modulo di Azure Active Directory per Windows PowerShell finestra di comando eseguire il comando come nell'esempio seguente, passando il file di input esportato da Viva Engage e un percorso del file di output.

    Utilizzo di esempio:

     UserMatchToAzureAD.ps1 -InputFile .\Users.csv -OutputFile .\Results.csv
    

    Per altre informazioni su come eseguire lo script, vedere il file PS1 precedente.

Analizzare i risultati e intervenire

  1. Aprire il file CSV dei risultati e filtrare tutte le righe che mostrano la colonna exists_in_azure_ad come FALSE.

    Ognuno di essi è costituito da account presenti in Viva Engage, ma non in Microsoft 365/Microsoft Entra ID. Per ognuno di essi, decidere se è necessario:

    • Sospendere l'account utente in Viva Engage se l'utente non deve avere accesso.

    • Creare l'utente in Microsoft 365/Microsoft Entra ID.

  2. Dopo aver completato queste operazioni, è consigliabile eseguire di nuovo questi passaggi dall'inizio per verificare che tutti gli utenti siano ora disponibili in Microsoft Entra ID.

Dopo un controllo completo, se si applica l'identità di Microsoft 365, valutare la possibilità di firmare tutti gli utenti correnti per assicurarsi che tutti gli utenti accedono con le proprie credenziali di Microsoft 365 e non usino le credenziali memorizzate nella cache. Se si sceglie di eseguire questa operazione, assicurarsi di comunicare prima agli utenti. Altre informazioni in Applicare l'identità di Microsoft 365 per gli utenti Viva Engage.