Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPOUserProfileProperty: failed to restore #3226

Closed
leitzler opened this issue Apr 26, 2023 · 4 comments · Fixed by #3306 or #3318
Closed

SPOUserProfileProperty: failed to restore #3226

leitzler opened this issue Apr 26, 2023 · 4 comments · Fixed by #3306 or #3318

Comments

@leitzler
Copy link

Details of the scenario you tried and the problem that is occurring

I exported a clean developer tenant with default sample data (https://developer.microsoft.com/en-us/microsoft-365/dev-program).
Then, when I restored the full snapshot, SPOUserProfileProperty failed with the following log (with slightly altered values for privacy reasons):

VERBOSE: [701AE4068A8E]: LCM:  [ Start  Resource ]  [[SPOUserProfileProperty]SPOUserProfileProperty]
VERBOSE: [701AE4068A8E]: LCM:  [ Start  Test     ]  [[SPOUserProfileProperty]SPOUserProfileProperty]
VERBOSE: [701AE4068A8E]:                            [[SPOUserProfileProperty]SPOUserProfileProperty] Testing configuration for SPO Sharing settings
VERBOSE: [701AE4068A8E]:                            [[SPOUserProfileProperty]SPOUserProfileProperty] Getting SPO Profile Properties for user {[email protected]}
VERBOSE: [701AE4068A8E]:                            [[SPOUserProfileProperty]SPOUserProfileProperty] Get-TargetResource Result:
 ApplicationId=***
ApplicationSecret=$null
CertificateThumbprint=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Credential=$null
Ensure=Present
Managedidentity=False
Properties=(@{Key=UserProfile_GUID; Value=11111111-1111-45f4-9322-ec302e15a74a},@{Key=SID; Value=i:0h.f|membership|[email protected]},@{Key=ADGuid; Value=System.Byte[]},@{Key=AccountName;
Value=i:0#.f|membership|[email protected]},@{Key=FirstName; Value=Pontus},@{Key=SPS-PhoneticFirstName; Value=},@{Key=LastName; Value=Leitzler},@{Key=SPS-PhoneticLastName; Value=},@{Key=PreferredName;
Value=Pontus Leitzler},@{Key=SPS-PhoneticDisplayName; Value=},@{Key=WorkPhone; Value=46701111111},@{Key=Department; Value=},@{Key=Title; Value=},@{Key=SPS-Department; Value=},@{Key=Manager; Value=},@{Key=AboutMe;
Value=},@{Key=PersonalSpace; Value=/personal/leitzler_foobar_onmicrosoft_com/},@{Key=PictureURL; Value=},@{Key=UserName; [email protected]},@{Key=QuickLinks; Value=},@{Key=WebSite;
Value=},@{Key=PublicSiteRedirect; Value=},@{Key=SPS-JobTitle; Value=},@{Key=SPS-Dotted-line; Value=},@{Key=SPS-Peers; Value=},@{Key=SPS-Responsibility; Value=},@{Key=SPS-SipAddress;
[email protected]},@{Key=SPS-MySiteUpgrade; Value=},@{Key=SPS-ProxyAddresses; Value=},@{Key=SPS-HireDate; Value=},@{Key=SPS-DisplayOrder; Value=},@{Key=SPS-ClaimID;
[email protected]},@{Key=SPS-ClaimProviderID; Value=membership},@{Key=SPS-ResourceSID; Value=},@{Key=SPS-ResourceAccountName; Value=},@{Key=SPS-MasterAccountName;
Value=},@{Key=SPS-UserPrincipalName; [email protected]},@{Key=SPS-O15FirstRunExperience; Value=},@{Key=SPS-PersonalSiteInstantiationState; Value=2},@{Key=SPS-DistinguishedName;
Value=CN=22222222-2222-442f-890f-4dd330523678,OU=33333333-3333-46f8-8373-12be0fd5f100,OU=Tenants,OU=MSOnline,DC=SPODS199999,DC=msft,DC=net},@{Key=SPS-SourceObjectDN; Value=},@{Key=SPS-ClaimProviderType;
Value=Forms},@{Key=SPS-SavedAccountName; Value=i:0#.f|membership|[email protected]},@{Key=SPS-SavedSID; Value=System.Byte[]},@{Key=SPS-ObjectExists; Value=},@{Key=SPS-PersonalSiteCapabilities;
Value=4},@{Key=SPS-PersonalSiteFirstCreationTime; Value=4/17/2023 9:07:48 AM},@{Key=SPS-PersonalSiteLastCreationTime; Value=4/17/2023 9:07:48 AM},@{Key=SPS-PersonalSiteNumberOfRetries;
Value=1},@{Key=SPS-PersonalSiteFirstCreationError; Value=},@{Key=SPS-FeedIdentifier; Value=},@{Key=WorkEmail; [email protected]},@{Key=CellPhone; Value=},@{Key=Fax; Value=},@{Key=HomePhone;
Value=},@{Key=Office; Value=},@{Key=SPS-Location; Value=},@{Key=Assistant; Value=},@{Key=SPS-PastProjects; Value=},@{Key=SPS-Skills; Value=},@{Key=SPS-School; Value=},@{Key=SPS-Birthday;
Value=},@{Key=SPS-StatusNotes; Value=},@{Key=SPS-Interests; Value=},@{Key=SPS-HashTags; Value=},@{Key=SPS-EmailOptin; Value=},@{Key=SPS-PrivacyPeople; Value=True},@{Key=SPS-PrivacyActivity;
Value=4095},@{Key=SPS-PictureTimestamp; Value=},@{Key=SPS-PicturePlaceholderState; Value=},@{Key=SPS-PictureExchangeSyncState; Value=},@{Key=SPS-TimeZone; Value=},@{Key=OfficeGraphEnabled;
Value=},@{Key=SPS-UserType; Value=0},@{Key=SPS-HideFromAddressLists; Value=False},@{Key=SPS-RecipientTypeDetails; Value=},@{Key=DelveFlags; Value=},@{Key=VideoUserPopup; Value=},@{Key=msOnline-ObjectId;
Value=22222222-2222-442f-890f-4dd330523678},@{Key=SPS-PointPublishingUrl; Value=},@{Key=SPS-TenantInstanceId; Value=},@{Key=SPS-SharePointHomeExperienceState; Value=},@{Key=SPS-MultiGeoFlags; Value=})
TenantId=***
[email protected]
VERBOSE: [701AE4068A8E]:                            [[SPOUserProfileProperty]SPOUserProfileProperty] Target Values: ApplicationId=***
CertificateThumbprint=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Ensure=Present
Properties=({Key=UserProfile_GUID; Value=11111111-1111-45f4-9322-ec302e15a74a},{Key=SID; Value=i:0h.f|membership|[email protected]},{Key=ADGuid; Value=System.Byte[]},{Key=AccountName;
Value=i:0#.f|membership|leitzler@$OrganizationName},{Key=FirstName; Value=Pontus},{Key=SPS-PhoneticFirstName; Value=},{Key=LastName; Value=Leitzler},{Key=SPS-PhoneticLastName; Value=},{Key=PreferredName;
Value=Pontus Leitzler},{Key=SPS-PhoneticDisplayName; Value=},{Key=WorkPhone; Value=46701111111},{Key=Department; Value=},{Key=Title; Value=},{Key=SPS-Department; Value=},{Key=Manager; Value=},{Key=AboutMe;
Value=},{Key=PersonalSpace; Value=/personal/leitzler_foobar_onmicrosoft_com/},{Key=PictureURL; Value=},{Key=UserName; Value=leitzler@$OrganizationName},{Key=QuickLinks; Value=},{Key=WebSite;
Value=},{Key=PublicSiteRedirect; Value=},{Key=SPS-JobTitle; Value=},{Key=SPS-Dotted-line; Value=},{Key=SPS-Peers; Value=},{Key=SPS-Responsibility; Value=},{Key=SPS-SipAddress;
Value=leitzler@$OrganizationName},{Key=SPS-MySiteUpgrade; Value=},{Key=SPS-ProxyAddresses; Value=},{Key=SPS-HireDate; Value=},{Key=SPS-DisplayOrder; Value=},{Key=SPS-ClaimID;
Value=leitzler@$OrganizationName},{Key=SPS-ClaimProviderID; Value=membership},{Key=SPS-ResourceSID; Value=},{Key=SPS-ResourceAccountName; Value=},{Key=SPS-MasterAccountName; Value=},{Key=SPS-UserPrincipalName;
Value=leitzler@$OrganizationName},{Key=SPS-O15FirstRunExperience; Value=},{Key=SPS-PersonalSiteInstantiationState; Value=2},{Key=SPS-DistinguishedName;
Value=CN=22222222-2222-442f-890f-4dd330523678,OU=33333333-3333-46f8-8373-12be0fd5f100,OU=Tenants,OU=MSOnline,DC=SPODS199999,DC=msft,DC=net},{Key=SPS-SourceObjectDN; Value=},{Key=SPS-ClaimProviderType;
Value=Forms},{Key=SPS-SavedAccountName; Value=i:0#.f|membership|leitzler@$OrganizationName},{Key=SPS-SavedSID; Value=System.Byte[]},{Key=SPS-ObjectExists; Value=},{Key=SPS-PersonalSiteCapabilities;
Value=4},{Key=SPS-PersonalSiteFirstCreationTime; Value=4/17/2023 9:07:48 AM},{Key=SPS-PersonalSiteLastCreationTime; Value=4/17/2023 9:07:48 AM},{Key=SPS-PersonalSiteNumberOfRetries;
Value=1},{Key=SPS-PersonalSiteFirstCreationError; Value=},{Key=SPS-FeedIdentifier; Value=},{Key=WorkEmail; Value=leitzler@$OrganizationName},{Key=CellPhone; Value=},{Key=Fax; Value=},{Key=HomePhone;
Value=},{Key=Office; Value=},{Key=SPS-Location; Value=},{Key=Assistant; Value=},{Key=SPS-PastProjects; Value=},{Key=SPS-Skills; Value=},{Key=SPS-School; Value=},{Key=SPS-Birthday; Value=},{Key=SPS-StatusNotes;
Value=},{Key=SPS-Interests; Value=},{Key=SPS-HashTags; Value=},{Key=SPS-EmailOptin; Value=},{Key=SPS-PrivacyPeople; Value=True},{Key=SPS-PrivacyActivity; Value=4095},{Key=SPS-PictureTimestamp;
Value=},{Key=SPS-PicturePlaceholderState; Value=},{Key=SPS-PictureExchangeSyncState; Value=},{Key=SPS-TimeZone; Value=},{Key=OfficeGraphEnabled; Value=},{Key=SPS-UserType; Value=0},{Key=SPS-HideFromAddressLists;
Value=False},{Key=SPS-RecipientTypeDetails; Value=},{Key=DelveFlags; Value=},{Key=VideoUserPopup; Value=},{Key=msOnline-ObjectId; Value=22222222-2222-442f-890f-4dd330523678},{Key=SPS-PointPublishingUrl;
Value=},{Key=SPS-TenantInstanceId; Value=},{Key=SPS-SharePointHomeExperienceState; Value=},{Key=SPS-MultiGeoFlags; Value=})
TenantId=***
[email protected]
Verbose=True
Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Properties'  Key being added: 'Properties'"
    + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : ArgumentException
    + PSComputerName        : localhost

VERBOSE: [701AE4068A8E]:                            [[SPOUserProfileProperty]SPOUserProfileProperty] Test-TargetResource returned False
VERBOSE: [701AE4068A8E]: LCM:  [ End    Test     ]  [[SPOUserProfileProperty]SPOUserProfileProperty]  in 1.6790 seconds.
The PowerShell DSC resource '[SPOUserProfileProperty]SPOUserProfileProperty' with SourceInfo 'C:\full\M365TenantConfig_Fixed.ps1::20551::9::SPOUserProfileProperty' threw one or more non-terminating errors while
running the Test-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
    + CategoryInfo          : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : NonTerminatingErrorFromProvider
    + PSComputerName        : localhost

Verbose logs showing the problem

See above.

Suggested solution to the issue

N/A

The DSC configuration that is used to reproduce the issue (as detailed as possible)

Using Windows Server Core container, mcr.microsoft.com/windows/servercore:1809-amd64.

Install-PackageProvider -Name NuGet -Force
Install-Module Microsoft365DSC -Force
Update-M365DSCDependencies

The operating system the target node is running

OsName               : Microsoft Windows Server 2019 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 1809
WindowsBuildLabEx    : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage           : en-US
OsMuiLanguages       : {en-US}
$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17763.3770
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.3770
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version of the DSC module that was used ('dev' if using current dev branch)

1.23.412.1 Microsoft365DSC                     PSGallery            This DSC module is used to configure and monitor Microsoft tenants, including SharePoint Online, Exchange, Teams, etc.
@andikrueger andikrueger added Bug Something isn't working SharePoint Online labels Apr 26, 2023
@NikCharlebois
Copy link
Collaborator

When you say "restored" a full snapshot, you mean that your scenario is the following?

1 - Take a snapshot of SPOUserProfileProperty from Tenant A
2 - Try to restore it on a different tenant, Tenant B

@leitzler
Copy link
Author

leitzler commented May 4, 2023

Take a "full" snapshot as in:

Export-M365DSCConfiguration -CertificateThumbprint $Cert.Thumbprint -TenantId <redacted>.onmicrosoft.com -ApplicationId 01234567-890a-bcde-f012-34567890abcd -Path full -Mode Full -MaxProcesses 64

Then I updated the ConfigurationData.psd1 so that ApplicationId points to an application with permissions to update (both uses the same certificate for simplicity as it is just a test).

Finally I ran a restore towards the same tenant.

@NikCharlebois
Copy link
Collaborator

Based on the scenario you describe above, you are taking a snapshot and then applying that extracted configuration to the same tenant you just exported from. Your expectations are that nothing will happen when running Start-DSCConfiguration since you the tenant has no drifts, correct? Just want to make sure I understand what you are trying to achieve here.

@leitzler
Copy link
Author

Yes, that sounds like what I expect.

As a side node I did change a few configurations in the tenant between "extract" and "apply" so it actually had drifts.
But the user that SPOUserProfilePropery refer to, [email protected] if I read it correctly, hasn't been changed by me.

NikCharlebois added a commit to NikCharlebois/Microsoft365DSC that referenced this issue May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants