From 8533f5a6f59d5fa64695aff8f1d75665e6d0d645 Mon Sep 17 00:00:00 2001 From: Michal Jirman Date: Thu, 2 Sep 2021 11:25:41 +0100 Subject: [PATCH 1/2] add support for employee org data --- msgraph/models.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/msgraph/models.go b/msgraph/models.go index e3086041..3b8e1b8c 100644 --- a/msgraph/models.go +++ b/msgraph/models.go @@ -1128,6 +1128,7 @@ type User struct { UsageLocation *StringNullWhenEmpty `json:"usageLocation,omitempty"` UserPrincipalName *string `json:"userPrincipalName,omitempty"` UserType *string `json:"userType,omitempty"` + EmployeeOrgData *EmployeeOrgData `json:"employeeOrgData,omitempty"` SchemaExtensions *[]SchemaExtensionData `json:"-"` } @@ -1239,3 +1240,8 @@ type WindowsHelloForBusinessAuthenticationMethod struct { ID *string `json:"id,omitempty"` KeyStrength *AuthenticationMethodKeyStrength `json:"authenticationMethodKeyStrength,omitempty"` } + +type EmployeeOrgData struct { + CostCenter *string `json:"costCenter,omitempty"` + Division *string `json:"division,omitempty"` +} From ca7bf3faa6f01d64d751178ddcf51d617616b9cd Mon Sep 17 00:00:00 2001 From: Michal Jirman Date: Thu, 9 Sep 2021 14:14:47 +0100 Subject: [PATCH 2/2] code refactor --- msgraph/models.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msgraph/models.go b/msgraph/models.go index 3b8e1b8c..f9d45306 100644 --- a/msgraph/models.go +++ b/msgraph/models.go @@ -1083,6 +1083,7 @@ type User struct { DisplayName *string `json:"displayName,omitempty"` EmployeeHireDate *time.Time `json:"employeeHireDate,omitempty"` EmployeeId *StringNullWhenEmpty `json:"employeeId,omitempty"` + EmployeeOrgData *EmployeeOrgData `json:"employeeOrgData,omitempty"` EmployeeType *string `json:"employeeType,omitempty"` ExternalUserState *string `json:"externalUserState,omitempty"` FaxNumber *StringNullWhenEmpty `json:"faxNumber,omitempty"` @@ -1128,7 +1129,6 @@ type User struct { UsageLocation *StringNullWhenEmpty `json:"usageLocation,omitempty"` UserPrincipalName *string `json:"userPrincipalName,omitempty"` UserType *string `json:"userType,omitempty"` - EmployeeOrgData *EmployeeOrgData `json:"employeeOrgData,omitempty"` SchemaExtensions *[]SchemaExtensionData `json:"-"` }