---
title: ".GetUsers (Opus Funktion)"
---
[TOC]

#### Beschreibung

Diese Funktion liest eine oder mehrere Benutzer aus Azure ab.

Die im Entra registrierte Applikation benötigt die entsprechenden Berechtigungen.

#### Argumente

| Name | Typ | Beschreibung |
| --- | --- | --- |
| UserPrincipalNames | [string] | Die UserPrincipal-Namen der Benutzer. Die UPNs sind identisch zu deren Emailadressen. |
| Select | [string] | Die Liste der Eigenschaften, die ausgelesen werden. Die MS Graph Referenz enthält alle verfügbaren Eigenschaften. |
| Expand | [string] | Die Liste der Navigationsfelder, die expandiert werden. Die MS Graph Referenz enthält alle verfügbaren Navigationsfelder. |

#### Rückgabewert [string]

Eine Liste von JSON-Strings, je ein Eintrag pro UserPrincipal. Der JSON-String enthält die Benutzerinformation im originalen OData-Format.

Im Fehlerfall enthält der Eintrag ein “error”-Feld mit den Fehlerinformationen.

#### Beispiel

<table><tr><th><p><code>AzureClient = AzureClient();</code></p><p>AzureClient.SetAccessType(“User Query“);</p><p><code>Las_UserPrincipals = [&quot;ron.weasley@student.hogwarts.ch&quot;,&quot;hermione.granger@student.hogwarts.ch&quot;];</code><br><code>Las_Select = [&quot;displayName&quot;,&quot;mail&quot;,&quot;userPrincipalName&quot;,&quot;userType&quot;,&quot;securityIdentifier&quot;];</code><br><code>Las_Expand = [];</code><br><code>Las_UserEntities = Lo_AzureClient.GetUsers(Las_UserPrincipals, Las_Select, Las_Expand);</code></p></th></tr><tr><td><p>&#160;</p></td></tr></table>

#### Siehe auch

[.SetAccessType (Opus Funktion)](setaccesstype-opus-funktion.md)

[https://learn.microsoft.com/en-us/graph/api/resources/user](https://learn.microsoft.com/en-us/graph/api/resources/user)

[https://learn.microsoft.com/en-us/graph/errors](https://learn.microsoft.com/en-us/graph/errors)
