|
|
|
|
@ -103,14 +103,24 @@ namespace Bit.Core.Services
@@ -103,14 +103,24 @@ namespace Bit.Core.Services
|
|
|
|
|
{ |
|
|
|
|
var group = new GroupEntry |
|
|
|
|
{ |
|
|
|
|
Id = new Uri(item.Path).Segments?.LastOrDefault() |
|
|
|
|
ReferenceId = new Uri(item.Path).Segments?.LastOrDefault() |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
if(group.Id == null) |
|
|
|
|
if(group.ReferenceId == null) |
|
|
|
|
{ |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// External Id |
|
|
|
|
if(item.Properties.Contains("objectGUID") && item.Properties["objectGUID"].Count > 0) |
|
|
|
|
{ |
|
|
|
|
group.ExternalId = item.Properties["objectGUID"][0].ToString(); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
group.ExternalId = group.ReferenceId; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Name |
|
|
|
|
if(item.Properties.Contains(SettingsService.Instance.Sync.GroupNameAttribute) && |
|
|
|
|
item.Properties[SettingsService.Instance.Sync.GroupNameAttribute].Count > 0) |
|
|
|
|
@ -193,14 +203,24 @@ namespace Bit.Core.Services
@@ -193,14 +203,24 @@ namespace Bit.Core.Services
|
|
|
|
|
{ |
|
|
|
|
var user = new UserEntry |
|
|
|
|
{ |
|
|
|
|
Id = new Uri(item.Path).Segments?.LastOrDefault() |
|
|
|
|
ReferenceId = new Uri(item.Path).Segments?.LastOrDefault() |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
if(user.Id == null) |
|
|
|
|
if(user.ReferenceId == null) |
|
|
|
|
{ |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// External Id |
|
|
|
|
if(item.Properties.Contains("objectGUID") && item.Properties["objectGUID"].Count > 0) |
|
|
|
|
{ |
|
|
|
|
user.ExternalId = item.Properties["objectGUID"][0].ToString(); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
user.ExternalId = user.ReferenceId; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
user.Disabled = EntryDisabled(item); |
|
|
|
|
|
|
|
|
|
// Email |
|
|
|
|
|