EducationUser erstellen
Artikel
07/18/2022
9 Minuten Lesedauer
3 Mitwirkende
In diesem Artikel
Namespace: microsoft.graph
Erstellen sie ein neues educationUser-Objekt.
Berechtigungen
Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie im Artikel zum Thema Berechtigungen .
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
Delegiert (Geschäfts-, Schul- oder Unikonto)
Nicht unterstützt
Delegiert (persönliches Microsoft-Konto)
Nicht unterstützt
Anwendung
EduRoster.ReadWrite.All
HTTP-Anforderung
POST /education/users
Name
Beschreibung
Authorization
Bearer {token}. Erforderlich.
Content-Type
application/json. Erforderlich.
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung des educationUser-Objekts an.
In der folgenden Tabelle sind die Eigenschaften aufgeführt, die angegeben werden müssen, wenn Sie educationUser erstellen.
Eigenschaft
Typ
Beschreibung
accountEnabled
Boolean
True , wenn das Konto aktiviert ist; andernfalls false . Diese Eigenschaft ist erforderlich, wenn ein Benutzer erstellt wird. Unterstützt $filter.
assignedLicenses
assignedLicense collection
Die Lizenzen, die dem Benutzer zugewiesen sind. Lässt keine NULL-Werte zu.
assignedPlans
assignedPlan collection
Die Pläne, die dem Benutzer zugewiesen sind. Schreibgeschützt. Lässt keine NULL-Werte zu.
businessPhones
String-Sammlung
Die Telefonnummern für den Benutzer. Hinweis: Obwohl dies eine String-Sammlung ist, kann nur eine Nummer für diese Eigenschaft festgelegt werden.
createdBy
identitySet
Entität, die den Benutzer erstellt hat.
department
String
Der Name der Abteilung, in der der Benutzer arbeitet. Unterstützt $filter.
displayName
Zeichenfolge
Der Name des Benutzers, der im Adressbuch angezeigt wird. Dies ist normalerweise eine Kombination aus dem Vornamen, der Initiale des weiteren Vornamens und des Nachnamens. Diese Eigenschaft ist beim Erstellen eines Benutzers erforderlich und kann nicht bei Updates deaktiviert werden. Unterstützt $filter und $orderby.
externalSource
educationExternalSource
Quelle, aus der dieser Benutzer erstellt wurde. Mögliche Werte sind: sis und manual.
externalSourceDetail
Zeichenfolge
Der Name der externen Quelle, aus der diese Ressourcen generiert wurden.
givenName
String
Der Vorname des Benutzers. Unterstützt $filter.
mail
Zeichenfolge
Die SMTP-Adresse des Benutzers, z. B. „jeff@contoso.onmicrosoft.com“. Schreibgeschützt. Unterstützt $filter.
mailingAddress
physicalAddress
E-Mail-Adresse des Benutzers
mailNickname
String
Der E-Mail-Alias für den Benutzer. Diese Eigenschaft muss beim Erstellen eines Benutzers angegeben werden. Unterstützt $filter.
middleName
String
Der zweite Vorname des Benutzers
mobilePhone
String
Die Nummer des primären Mobiltelefons für den Benutzer.
onPremisesInfo
educationOnPremisesInfo
Zusätzliche Informationen, die verwendet werden, um den AAD Benutzer dem Active Directory-Gegenstück zuzuordnen.
passwordPolicies
String
Gibt die Kennwortrichtlinien für den Benutzer an. Dieser Wert ist eine Enumeration, deren einziger möglicher Wert „DisableStrongPassword“ lautet. Damit können schwächere Kennwörter als in der Standardrichtlinie angegeben festgelegt werden. Auch „DisablePasswordExpiration“ kann angegeben werden. Die beiden können zusammen angegeben werden. Beispiel: "DisablePasswordExpiration, DisableStrongPassword".
passwordProfile
passwordProfile
Gibt das Kennwortprofil für den Benutzer an. Das Profil enthält das Kennwort des Benutzers. Diese Eigenschaft ist erforderlich, wenn ein Benutzer erstellt wird. Das Kennwort im Profil muss den Mindestanforderungen entsprechen, wie von der passwordPolicies -Eigenschaft angegeben. Standardmäßig ist ein sicheres Kennwort erforderlich.
preferredLanguage
String
Die bevorzugte Sprache für den Benutzer. Muss im ISO 639-1-Code angegeben werden. Beispiel: „en-US“.
primaryRole
educationUserRole
Standardrolle für einen Benutzer. Die Rolle des Benutzers kann in einer einzelnen Klasse unterschiedlich sein. Mögliche Werte sind: student, teacher und none.
provisionedPlans
ProvisionedPlan -Sammlung
Die Pläne, die für den Benutzer bereitgestellt wurden. Schreibgeschützt. Lässt keine NULL-Werte zu.
residenceAddress
physicalAddress
Die Wohnadresse des Benutzers
student
educationStudent
Ist die primäre Rolle Kursteilnehmer, enthält dieser Block spezifische Daten für Kursteilnehmer.
surname
String
Der Nachname des Benutzers. Unterstützt $filter.
teacher
educationTeacher
Wenn die primäre Rolle Lehrer ist, enthält dieser Block lehrerspezifische Daten.
usageLocation
Zeichenfolge
Ein aus zwei Buchstaben bestehender Ländercode (ISO-Standard 3166). Erforderlich für Benutzer, denen Lizenzen zugewiesen werden, aufgrund der gesetzlichen Vorschrift, dass die Verfügbarkeit von Diensten in einzelnen Ländern oder Regionen geprüft werden muss. Beispiele: "DE", "GB" und "US". Lässt keine NULL-Werte zu. Unterstützt $filter.
userPrincipalName
Zeichenfolge
Der User Principal Name (UPN) des Benutzers.
userType
String
Ein Zeichenfolgenwert kann zum Klassifizieren der Benutzertypen in Ihrem Verzeichnis verwendet werden, z. B. „Member“ und „Guest“. Unterstützt $filter.
Antwort
Wenn die Methode erfolgreich verläuft, werden der Antwortcode 201 Created und ein educationUser -Objekt im Antworttext zurückgegeben.
Beispiele
Anforderung
POST https://graph.microsoft.com/v1.0/education/users
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.educationUser",
"primaryRole": "String",
"middleName": "String",
"externalSource": "String",
"externalSourceDetail": "String",
"residenceAddress": {
"@odata.type": "microsoft.graph.physicalAddress"
},
"mailingAddress": {
"@odata.type": "microsoft.graph.physicalAddress"
},
"student": {
"@odata.type": "microsoft.graph.educationStudent"
},
"teacher": {
"@odata.type": "microsoft.graph.educationTeacher"
},
"createdBy": {
"@odata.type": "microsoft.graph.identitySet"
},
"accountEnabled": "Boolean",
"assignedLicenses": [
{
"@odata.type": "microsoft.graph.assignedLicense"
}
],
"assignedPlans": [
{
"@odata.type": "microsoft.graph.assignedPlan"
}
],
"businessPhones": [
"String"
],
"department": "String",
"displayName": "String",
"givenName": "String",
"mail": "String",
"mailNickname": "String",
"mobilePhone": "String",
"passwordPolicies": "String",
"passwordProfile": {
"@odata.type": "microsoft.graph.passwordProfile"
},
"officeLocation": "String",
"preferredLanguage": "String",
"provisionedPlans": [
{
"@odata.type": "microsoft.graph.provisionedPlan"
}
],
"refreshTokensValidFromDateTime": "String (timestamp)",
"showInAddressList": "Boolean",
"surname": "String",
"usageLocation": "String",
"userPrincipalName": "String",
"userType": "String",
"onPremisesInfo": {
"@odata.type": "microsoft.graph.educationOnPremisesInfo"
}
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var educationUser = new EducationUser
{
PrimaryRole = EducationUserRole.Student,
MiddleName = "String",
ExternalSource = EducationExternalSource.Sis,
ExternalSourceDetail = "String",
ResidenceAddress = new PhysicalAddress
{
},
MailingAddress = new PhysicalAddress
{
},
Student = new EducationStudent
{
},
Teacher = new EducationTeacher
{
},
CreatedBy = new IdentitySet
{
},
AccountEnabled = false,
AssignedLicenses = new List<AssignedLicense>()
{
new AssignedLicense
{
}
},
AssignedPlans = new List<AssignedPlan>()
{
new AssignedPlan
{
}
},
BusinessPhones = new List<String>()
{
"String"
},
Department = "String",
DisplayName = "String",
GivenName = "String",
Mail = "String",
MailNickname = "String",
MobilePhone = "String",
PasswordPolicies = "String",
PasswordProfile = new PasswordProfile
{
},
OfficeLocation = "String",
PreferredLanguage = "String",
ProvisionedPlans = new List<ProvisionedPlan>()
{
new ProvisionedPlan
{
}
},
RefreshTokensValidFromDateTime = DateTimeOffset.Parse("String (timestamp)"),
ShowInAddressList = false,
Surname = "String",
UsageLocation = "String",
UserPrincipalName = "String",
UserType = "String",
OnPremisesInfo = new EducationOnPremisesInfo
{
}
};
await graphClient.Education.Users
.Request()
.AddAsync(educationUser);
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
const options = {
authProvider,
};
const client = Client.init(options);
const educationUser = {
'@odata.type': '#microsoft.graph.educationUser',
primaryRole: 'String',
middleName: 'String',
externalSource: 'String',
externalSourceDetail: 'String',
residenceAddress: {
'@odata.type': 'microsoft.graph.physicalAddress'
},
mailingAddress: {
'@odata.type': 'microsoft.graph.physicalAddress'
},
student: {
'@odata.type': 'microsoft.graph.educationStudent'
},
teacher: {
'@odata.type': 'microsoft.graph.educationTeacher'
},
createdBy: {
'@odata.type': 'microsoft.graph.identitySet'
},
accountEnabled: 'Boolean',
assignedLicenses: [
{
'@odata.type': 'microsoft.graph.assignedLicense'
}
],
assignedPlans: [
{
'@odata.type': 'microsoft.graph.assignedPlan'
}
],
businessPhones: [
'String'
],
department: 'String',
displayName: 'String',
givenName: 'String',
mail: 'String',
mailNickname: 'String',
mobilePhone: 'String',
passwordPolicies: 'String',
passwordProfile: {
'@odata.type': 'microsoft.graph.passwordProfile'
},
officeLocation: 'String',
preferredLanguage: 'String',
provisionedPlans: [
{
'@odata.type': 'microsoft.graph.provisionedPlan'
}
],
refreshTokensValidFromDateTime: 'String (timestamp)',
showInAddressList: 'Boolean',
surname: 'String',
usageLocation: 'String',
userPrincipalName: 'String',
userType: 'String',
onPremisesInfo: {
'@odata.type': 'microsoft.graph.educationOnPremisesInfo'
}
};
await client.api('/education/users')
.post(educationUser);
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/education/users"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphEducationUser *educationUser = [[MSGraphEducationUser alloc] init];
[educationUser setPrimaryRole: [MSGraphEducationUserRole student]];
[educationUser setMiddleName:@"String"];
[educationUser setExternalSource: [MSGraphEducationExternalSource sis]];
[educationUser setExternalSourceDetail:@"String"];
MSGraphPhysicalAddress *residenceAddress = [[MSGraphPhysicalAddress alloc] init];
[educationUser setResidenceAddress:residenceAddress];
MSGraphPhysicalAddress *mailingAddress = [[MSGraphPhysicalAddress alloc] init];
[educationUser setMailingAddress:mailingAddress];
MSGraphEducationStudent *student = [[MSGraphEducationStudent alloc] init];
[educationUser setStudent:student];
MSGraphEducationTeacher *teacher = [[MSGraphEducationTeacher alloc] init];
[educationUser setTeacher:teacher];
MSGraphIdentitySet *createdBy = [[MSGraphIdentitySet alloc] init];
[educationUser setCreatedBy:createdBy];
[educationUser setAccountEnabled:@"Boolean"];
NSMutableArray *assignedLicensesList = [[NSMutableArray alloc] init];
MSGraphAssignedLicense *assignedLicenses = [[MSGraphAssignedLicense alloc] init];
[assignedLicensesList addObject: assignedLicenses];
[educationUser setAssignedLicenses:assignedLicensesList];
NSMutableArray *assignedPlansList = [[NSMutableArray alloc] init];
MSGraphAssignedPlan *assignedPlans = [[MSGraphAssignedPlan alloc] init];
[assignedPlansList addObject: assignedPlans];
[educationUser setAssignedPlans:assignedPlansList];
NSMutableArray *businessPhonesList = [[NSMutableArray alloc] init];
[businessPhonesList addObject: @"String"];
[educationUser setBusinessPhones:businessPhonesList];
[educationUser setDepartment:@"String"];
[educationUser setDisplayName:@"String"];
[educationUser setGivenName:@"String"];
[educationUser setMail:@"String"];
[educationUser setMailNickname:@"String"];
[educationUser setMobilePhone:@"String"];
[educationUser setPasswordPolicies:@"String"];
MSGraphPasswordProfile *passwordProfile = [[MSGraphPasswordProfile alloc] init];
[educationUser setPasswordProfile:passwordProfile];
[educationUser setOfficeLocation:@"String"];
[educationUser setPreferredLanguage:@"String"];
NSMutableArray *provisionedPlansList = [[NSMutableArray alloc] init];
MSGraphProvisionedPlan *provisionedPlans = [[MSGraphProvisionedPlan alloc] init];
[provisionedPlansList addObject: provisionedPlans];
[educationUser setProvisionedPlans:provisionedPlansList];
[educationUser setRefreshTokensValidFromDateTime:@"String (timestamp)"];
[educationUser setShowInAddressList:@"Boolean"];
[educationUser setSurname:@"String"];
[educationUser setUsageLocation:@"String"];
[educationUser setUserPrincipalName:@"String"];
[educationUser setUserType:@"String"];
MSGraphEducationOnPremisesInfo *onPremisesInfo = [[MSGraphEducationOnPremisesInfo alloc] init];
[educationUser setOnPremisesInfo:onPremisesInfo];
NSError *error;
NSData *educationUserData = [educationUser getSerializedDataWithError:&error];
[urlRequest setHTTPBody:educationUserData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
EducationUser educationUser = new EducationUser();
educationUser.primaryRole = EducationUserRole.STUDENT;
educationUser.middleName = "String";
educationUser.externalSource = EducationExternalSource.SIS;
educationUser.externalSourceDetail = "String";
PhysicalAddress residenceAddress = new PhysicalAddress();
educationUser.residenceAddress = residenceAddress;
PhysicalAddress mailingAddress = new PhysicalAddress();
educationUser.mailingAddress = mailingAddress;
EducationStudent student = new EducationStudent();
educationUser.student = student;
EducationTeacher teacher = new EducationTeacher();
educationUser.teacher = teacher;
IdentitySet createdBy = new IdentitySet();
educationUser.createdBy = createdBy;
educationUser.accountEnabled = false;
LinkedList<AssignedLicense> assignedLicensesList = new LinkedList<AssignedLicense>();
AssignedLicense assignedLicenses = new AssignedLicense();
assignedLicensesList.add(assignedLicenses);
educationUser.assignedLicenses = assignedLicensesList;
LinkedList<AssignedPlan> assignedPlansList = new LinkedList<AssignedPlan>();
AssignedPlan assignedPlans = new AssignedPlan();
assignedPlansList.add(assignedPlans);
educationUser.assignedPlans = assignedPlansList;
LinkedList<String> businessPhonesList = new LinkedList<String>();
businessPhonesList.add("String");
educationUser.businessPhones = businessPhonesList;
educationUser.department = "String";
educationUser.displayName = "String";
educationUser.givenName = "String";
educationUser.mail = "String";
educationUser.mailNickname = "String";
educationUser.mobilePhone = "String";
educationUser.passwordPolicies = "String";
PasswordProfile passwordProfile = new PasswordProfile();
educationUser.passwordProfile = passwordProfile;
educationUser.officeLocation = "String";
educationUser.preferredLanguage = "String";
LinkedList<ProvisionedPlan> provisionedPlansList = new LinkedList<ProvisionedPlan>();
ProvisionedPlan provisionedPlans = new ProvisionedPlan();
provisionedPlansList.add(provisionedPlans);
educationUser.provisionedPlans = provisionedPlansList;
educationUser.refreshTokensValidFromDateTime = OffsetDateTimeSerializer.deserialize("String (timestamp)");
educationUser.showInAddressList = false;
educationUser.surname = "String";
educationUser.usageLocation = "String";
educationUser.userPrincipalName = "String";
educationUser.userType = "String";
EducationOnPremisesInfo onPremisesInfo = new EducationOnPremisesInfo();
educationUser.onPremisesInfo = onPremisesInfo;
graphClient.education().users()
.buildRequest()
.post(educationUser);
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewEducationUser()
primaryRole := "String"
requestBody.SetPrimaryRole(&primaryRole)
middleName := "String"
requestBody.SetMiddleName(&middleName)
externalSource := "String"
requestBody.SetExternalSource(&externalSource)
externalSourceDetail := "String"
requestBody.SetExternalSourceDetail(&externalSourceDetail)
residenceAddress := msgraphsdk.NewPhysicalAddress()
requestBody.SetResidenceAddress(residenceAddress)
residenceAddress.SetAdditionalData(map[string]interface{}{
"@odata.type": "microsoft.graph.physicalAddress",
}
mailingAddress := msgraphsdk.NewPhysicalAddress()
requestBody.SetMailingAddress(mailingAddress)
mailingAddress.SetAdditionalData(map[string]interface{}{
"@odata.type": "microsoft.graph.physicalAddress",
}
student := msgraphsdk.NewEducationStudent()
requestBody.SetStudent(student)
student.SetAdditionalData(map[string]interface{}{
"@odata.type": "microsoft.graph.educationStudent",
}
teacher := msgraphsdk.NewEducationTeacher()
requestBody.SetTeacher(teacher)
teacher.SetAdditionalData(map[string]interface{}{
"@odata.type": "microsoft.graph.educationTeacher",
}
createdBy := msgraphsdk.NewIdentitySet()
requestBody.SetCreatedBy(createdBy)
createdBy.SetAdditionalData(map[string]interface{}{
"@odata.type": "microsoft.graph.identitySet",
}
accountEnabled := "Boolean"
requestBody.SetAccountEnabled(&accountEnabled)
requestBody.SetAssignedLicenses( []AssignedLicense {
msgraphsdk.NewAssignedLicense(),
SetAdditionalData(map[string]interface{}{
"@odata.type": "microsoft.graph.assignedLicense",
}
}
requestBody.SetAssignedPlans( []AssignedPlan {
msgraphsdk.NewAssignedPlan(),
SetAdditionalData(map[string]interface{}{
"@odata.type": "microsoft.graph.assignedPlan",
}
}
requestBody.SetBusinessPhones( []String {
"String",
}
department := "String"
requestBody.SetDepartment(&department)
displayName := "String"
requestBody.SetDisplayName(&displayName)
givenName := "String"
requestBody.SetGivenName(&givenName)
mail := "String"
requestBody.SetMail(&mail)
mailNickname := "String"
requestBody.SetMailNickname(&mailNickname)
mobilePhone := "String"
requestBody.SetMobilePhone(&mobilePhone)
passwordPolicies := "String"
requestBody.SetPasswordPolicies(&passwordPolicies)
passwordProfile := msgraphsdk.NewPasswordProfile()
requestBody.SetPasswordProfile(passwordProfile)
passwordProfile.SetAdditionalData(map[string]interface{}{
"@odata.type": "microsoft.graph.passwordProfile",
}
officeLocation := "String"
requestBody.SetOfficeLocation(&officeLocation)
preferredLanguage := "String"
requestBody.SetPreferredLanguage(&preferredLanguage)
requestBody.SetProvisionedPlans( []ProvisionedPlan {
msgraphsdk.NewProvisionedPlan(),
SetAdditionalData(map[string]interface{}{
"@odata.type": "microsoft.graph.provisionedPlan",
}
}
refreshTokensValidFromDateTime, err := time.Parse(time.RFC3339, "String (timestamp)")
requestBody.SetRefreshTokensValidFromDateTime(&refreshTokensValidFromDateTime)
showInAddressList := "Boolean"
requestBody.SetShowInAddressList(&showInAddressList)
surname := "String"
requestBody.SetSurname(&surname)
usageLocation := "String"
requestBody.SetUsageLocation(&usageLocation)
userPrincipalName := "String"
requestBody.SetUserPrincipalName(&userPrincipalName)
userType := "String"
requestBody.SetUserType(&userType)
onPremisesInfo := msgraphsdk.NewEducationOnPremisesInfo()
requestBody.SetOnPremisesInfo(onPremisesInfo)
onPremisesInfo.SetAdditionalData(map[string]interface{}{
"@odata.type": "microsoft.graph.educationOnPremisesInfo",
}
requestBody.SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.educationUser",
}
result, err := graphClient.Education().Users().Post(requestBody)
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
Import-Module Microsoft.Graph.Education
$params = @{
"@odata.type" = "#microsoft.graph.educationUser"
PrimaryRole = "String"
MiddleName = "String"
ExternalSource = "String"
ExternalSourceDetail = "String"
ResidenceAddress = @{
"@odata.type" = "microsoft.graph.physicalAddress"
}
MailingAddress = @{
"@odata.type" = "microsoft.graph.physicalAddress"
}
Student = @{
"@odata.type" = "microsoft.graph.educationStudent"
}
Teacher = @{
"@odata.type" = "microsoft.graph.educationTeacher"
}
CreatedBy = @{
"@odata.type" = "microsoft.graph.identitySet"
}
AccountEnabled = "Boolean"
AssignedLicenses = @(
@{
"@odata.type" = "microsoft.graph.assignedLicense"
}
)
AssignedPlans = @(
@{
"@odata.type" = "microsoft.graph.assignedPlan"
}
)
BusinessPhones = @(
"String"
)
Department = "String"
DisplayName = "String"
GivenName = "String"
Mail = "String"
MailNickname = "String"
MobilePhone = "String"
PasswordPolicies = "String"
PasswordProfile = @{
"@odata.type" = "microsoft.graph.passwordProfile"
}
OfficeLocation = "String"
PreferredLanguage = "String"
ProvisionedPlans = @(
@{
"@odata.type" = "microsoft.graph.provisionedPlan"
}
)
RefreshTokensValidFromDateTime = [System.DateTime]::Parse("String (timestamp)")
ShowInAddressList = "Boolean"
Surname = "String"
UsageLocation = "String"
UserPrincipalName = "String"
UserType = "String"
OnPremisesInfo = @{
"@odata.type" = "microsoft.graph.educationOnPremisesInfo"
}
}
New-MgEducationUser -BodyParameter $params
Ausführliche Informationen zum Hinzufügen des SDK zu Ihrem Projekt und zum Erstellen einer authProvider-Instanz finden Sie in der SDK-Dokumentation .
Antwort
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 201 Created
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.educationUser",
"id": "90eedea1-dea1-90ee-a1de-ee90a1deee90",
"primaryRole": "String",
"middleName": "String",
"externalSource": "String",
"externalSourceDetail": "String",
"residenceAddress": {
"@odata.type": "microsoft.graph.physicalAddress"
},
"mailingAddress": {
"@odata.type": "microsoft.graph.physicalAddress"
},
"student": {
"@odata.type": "microsoft.graph.educationStudent"
},
"teacher": {
"@odata.type": "microsoft.graph.educationTeacher"
},
"createdBy": {
"@odata.type": "microsoft.graph.identitySet"
},
"accountEnabled": "Boolean",
"assignedLicenses": [
{
"@odata.type": "microsoft.graph.assignedLicense"
}
],
"assignedPlans": [
{
"@odata.type": "microsoft.graph.assignedPlan"
}
],
"businessPhones": [
"String"
],
"department": "String",
"displayName": "String",
"givenName": "String",
"mail": "String",
"mailNickname": "String",
"mobilePhone": "String",
"passwordPolicies": "String",
"passwordProfile": {
"@odata.type": "microsoft.graph.passwordProfile"
},
"officeLocation": "String",
"preferredLanguage": "String",
"provisionedPlans": [
{
"@odata.type": "microsoft.graph.provisionedPlan"
}
],
"refreshTokensValidFromDateTime": "String (timestamp)",
"showInAddressList": "Boolean",
"surname": "String",
"usageLocation": "String",
"userPrincipalName": "String",
"userType": "String",
"onPremisesInfo": {
"@odata.type": "microsoft.graph.educationOnPremisesInfo"
}
}