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

An error message when importing the Power Platform configuration - failed to execute Set-TargetResource #5695

Open
barnaba92 opened this issue Jan 29, 2025 · 0 comments

Comments

@barnaba92
Copy link

Description of the issue

An error message when importing the Power Platform configuration exported from another test tenant. It is related to tenant cloning (both tenants are test tenants, with minimum customization).

Microsoft 365 DSC Version

1.25.129.1

Which workloads are affected

Power Platform

The DSC configuration

# Generated with Microsoft365DSC version 1.25.129.1
# For additional information on how to use Microsoft365DSC, please visit https://aka.ms/M365DSC
param (
    [parameter()]
    [System.Management.Automation.PSCredential]
    $Credential
)

Configuration M365TenantConfig-7
{
    param (
        [parameter()]
        [System.Management.Automation.PSCredential]
        $Credential
    )

    if ($null -eq $Credential)
    {
        <# Credentials #>
        $Credscredential = Get-Credential -Message "Credentials"

    }
    else
    {
        $CredsCredential = $Credential
    }

    $OrganizationName = $CredsCredential.UserName.Split('@')[1]

    Import-DscResource -ModuleName 'Microsoft365DSC' -ModuleVersion '1.25.129.1'

    Node localhost
    {
        PPTenantIsolationSettings "PPTenantIsolationSettings"
        {
            Credential           = $Credscredential;
            Enabled              = $False;
            IsSingleInstance     = "Yes";
        }
        PPTenantSettings "PPTenantSettings"
        {
            AllowNewOrgChannelDefault                          = $True;
            Credential                                         = $Credscredential;
            DisableAdminDigest                                 = $False;
            DisableBillingPolicyCreationByNonAdminUsers        = $False;
            DisableBingVideoSearch                             = $False;
            DisableCapacityAllocationByEnvironmentAdmins       = $True;
            DisableChampionsInvitationReachout                 = $False;
            DisableCommunitySearch                             = $False;
            DisableConnectionSharingWithEveryone               = $False;
            DisableCopilot                                     = $False;
            DisableCopilotWithBing                             = $False;
            DisableCreateFromFigma                             = $False;
            DisableCreateFromImage                             = $False;
            DisableDeveloperEnvironmentCreationByNonAdminUsers = $False;
            DisableDocsSearch                                  = $True;
            DisableEnvironmentCreationByNonAdminUsers          = $False;
            DisableMakerMatch                                  = $False;
            DisableNewsletterSendout                           = $False;
            DisableNPSCommentsReachout                         = $False;
            DisablePortalsCreationByNonAdminUsers              = $False;
            DisablePreferredDataLocationForTeamsEnvironment    = $False;
            DisableShareWithEveryone                           = $True;
            DisableSkillsMatchInvitationReachout               = $False;
            DisableSupportTicketsVisibleByAllUsers             = $True;
            DisableSurveyFeedback                              = $False;
            DisableSurveyScreenshots                           = $False;
            DisableTrialEnvironmentCreationByNonAdminUsers     = $False;
            DisableUnusedLicenseAssignment                     = $False;
            DisableUseOfUnassignedAIBuilderCredits             = $False;
            EnableCanvasAppInsights                            = $True;
            EnableDefaultEnvironmentRouting                    = $False;
            EnableDesktopFlowDataPolicyManagement              = $False;
            EnableExternalAuthenticationProvidersInPowerPages  = "All";
            EnableGenerativeAIFeaturesForSiteUsers             = "All";
            EnableGuestsToMake                                 = $False;
            EnableTenantCapacityReportForEnvironmentAdmins     = $False;
            EnableTenantLicensingReportForEnvironmentAdmins    = $False;
            EnvironmentRoutingAllMakers                        = $False;
            IsSingleInstance                                   = "Yes";
            ShareWithColleaguesUserLimit                       = 10000;
            StorageCapacityConsumptionWarningThreshold         = 85;
            WalkMeOptOut                                       = $False;
        }
    }
}

M365TenantConfig-7 -ConfigurationData .\ConfigurationData.psd1 -Credential $Credential

Verbose logs showing the problem

VERBOSE: [WIN-E8DU6GU3JDU]:                            [[PPTenantSettings]PPTenantSettings] Test-TargetResource returned False
VERBOSE: [WIN-E8DU6GU3JDU]: LCM:  [ End    Test     ]  [[PPTenantSettings]PPTenantSettings]  in 1.2810 seconds.
VERBOSE: [WIN-E8DU6GU3JDU]: LCM:  [ Start  Set      ]  [[PPTenantSettings]PPTenantSettings]
VERBOSE: [WIN-E8DU6GU3JDU]:                            [[PPTenantSettings]PPTenantSettings] Setting Power Platform Tenant Settings con
figuration
VERBOSE: [WIN-E8DU6GU3JDU]: LCM:  [ End    Set      ]  [[PPTenantSettings]PPTenantSettings]  in 1.1870 seconds.
PowerShell DSC resource MSFT_PPTenantSettings  failed to execute Set-TargetResource functionality with error message: Exception 
calling "GetResult" with "0" argument(s): "Showing a modal dialog box or form when the application is not running in UserInteractive 
mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service 
application." 
    + CategoryInfo          : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName        : localhost
 
VERBOSE: [WIN-E8DU6GU3JDU]: LCM:  [ End    Set      ]
The SendConfigurationApply function did not succeed.
    + CategoryInfo          : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 1
    + PSComputerName        : localhost
 
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 36.678 seconds

Environment Information + PowerShell Version

OsName               : Microsoft Windows Server 2022 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage           : en-US
OsMuiLanguages       : {en-US}



PS C:\Users\Administrator>
PS C:\Users\Administrator> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.20348.1
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.20348.1
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant