Error while executing Start-AzureSqlDatabaseImport - azure

We get the following error while executing Start-AzureSqlDatabaseImport.SQL server firewall rule is configured properly.Container is with Public access.
Error is thrown at this line: Start-AzureSqlDatabaseImport -SqlConnectionContext $SqlCtx -StorageContainer $Container -DatabaseName $DbName -BlobName $BlobName -ErrorAction Stop
Start-AzureSqlDatabaseImport : An error occurred while making the HTTP request to https://management.core.windows.net/subscriptionid/services/sqlservers/servers/sqlservername/DacOperations/Import. This could be due to the fact that the server
certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security
binding between the client and the server.
At C:\Azure\PowerShellScripts\ImportDB.ps1:13 char:1
+ Start-AzureSqlDatabaseImport -SqlConnectionContext $SqlCtx -StorageContainer $Co ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-AzureSqlDatabaseImport], CommunicationException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.SqlDatabase.Database.Cmdlet.StartAzureSqlDatabaseImport

Related

Azure Function - Connect-MSolservice error

Today, I've created an Azure Function to connect to Office365.
This is the code, which it works on my PC:
#Input bindings are passed in via param block.
param($Request, $TriggerMetadata)
#Import-Module AzureAD -UseWindowsPowershell
Import-Module MSonline -UseWindowsPowershell -Force
$PWord = ConvertTo-SecureString –String "MyPass" –AsPlainText -Force
$Credential = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList "MyTenantAdmin", $PWord
#Connect-AzureAD -credential $Credential
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Connect-MSolService -credential $Credential
However, when I try it on the Azure Function, I obtain this error:
2022-12-28T20:45:09Z [Error] ERROR: Authentication Error: Unable
to complete authentication request (potentially a proxy issue)
OriginInfo : localhost Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Exception: Authentication Error: Unable to complete authentication request (potentially a proxy
issue) --->
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException: User
realm discovery failed
at Microsoft.Identity.Core.WsTrust.CommonNonInteractiveHandler.d__5.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Core\WsTrust\CommonNonInteractiveHandler.cs:line
74
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenUsernamePasswordHandler.d__5.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Internal\Flows\NonInteractive\AcquireTokenUsernamePasswordHandler.cs:line
77
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.d__60.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Internal\Flows\AcquireTokenHandlerBase.cs:line
241
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.d__39.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\AuthenticationContext.cs:line
542
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions.d__0.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Features\WinCommon\AuthenticationContextIntegratedAuthExtensions.cs:line
59
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.Online.Administration.Automation.CommonFiles.AuthManager.AuthenticateUser(AuthenticationContext
ac, PSCredential cred) in
X:\bt\1225946\repo\src\dev\PowerShell.V1\modules\psmodule\CommonFiles\AuthManager.cs:line
115
--- End of inner exception stack trace ---
at Microsoft.Online.Administration.Automation.CommonFiles.AuthManager.ProcessADALException(AdalException
aeGeneral, AuthenticationContext ac, IDictionary`2 accessTokens) in
X:\bt\1225946\repo\src\dev\PowerShell.V1\modules\psmodule\CommonFiles\AuthManager.cs:line
529
at Microsoft.Online.Administration.Automation.CommonFiles.AuthManager.AuthenticateUser(AuthenticationContext
ac, PSCredential cred) in
X:\bt\1225946\repo\src\dev\PowerShell.V1\modules\psmodule\CommonFiles\AuthManager.cs:line
136
at Microsoft.Online.Administration.Automation.ConnectMsolService.MsolCmdletProcessRecord()
in
X:\bt\1225946\repo\src\dev\PowerShell.V1\modules\psmodule\Cmdlets\Connect-Service.cs:line
247
SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfo
ErrorRecord :
Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Exception: Authentication Error: Unable to complete authentication request
(potentially a proxy issue) --->
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException: User
realm discovery failed
at Microsoft.Identity.Core.WsTrust.CommonNonInteractiveHandler.d__5.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Core\WsTrust\CommonNonInteractiveHandler.cs:line
74
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenUsernamePasswordHandler.d__5.MoveNext()
in
D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Internal\Flows\NonInteractive\AcquireTokenUsernamePasswordHandler.cs:line
77
--- End of stack trace from previous location where exception was thrown ---
The user has not MFA enabled.
Enable "System assigned identity" under Identity in Function App to register with AzureAD when running insideAzure functions. It will then grant all permissions/scopes required to operate with AzureAD-related modules.
To run connect-MsolService, MsOnline(Connecting to 365) module needs to be added in requirements.psd1 under App files in Azure functions. comes under Azure Acitve directory Module.
check the version compatibility for Msonline & Powershell
Add 64 bit version installer to handle binaries for the online office 365 modules.
FunctionApp -> Settings -> Configuration:
After checking all the above conditions try executing the same script to connect Msolservice.
Other approach:
As detailed in the article, I created a triggered function and connected to MsolService (office 365) with FTP hostname.
Function Properities in Portal:
Install Msoline module in local folder and deploy it to azure. Add username & password credentials in local path and mention that path in script to get the encrypted values.
FunctionApp -> Configuration -> Application settings:
Script:
param($Request, $TriggerMetadata)
$ModuleName = 'MSOnline'
$ModuleVersion = '1.1.*'
$user = $Env:user
$pword = $Env:pword
$path = "C:xxxx"
Import-module $ModuleName
$pWord = ConvertTo-SecureString –String $pword –AsPlainText -Force
$Credential = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $user, $pWord
Connect-MsolService -Credential $credential
Got successful response as shown:
Monitor Log check:

spring-integration-smb : jcifs.smb.SmbException: The parameter is incorrect while connect to NAS

I encountered a problem when connecting to a NAS shared directory using spring-integration-smb.
The problem is that I was able to connect to another shared Nas directory but for the pre-prod Nas, I encountered this problem.
Also, the shared server administrator confirmed that both directories have the same configuration.
You will find below the stack encountered
07 mars 2022;14:49:50.702 [scheduling-1] WARN jcifs.smb.SmbTransportImpl - Disconnecting transport while still in use Transport12[NAS03/XXXXXXXX:445,state=5,signingEnforced=false,usage=1]: [SmbSession[credentials=XXXXXXXXXX,targetHost=nas03,targetDomain=null,uid=0,connectionState=2,usage=1]]
07 mars 2022;14:49:50.702 [scheduling-1] WARN jcifs.smb.SmbSessionImpl - Logging off session while still in use SmbSession[credentials=XXXXXXXXX,targetHost=nas03,targetDomain=null,uid=0,connectionState=3,usage=1]:[SmbTree[share=PPD,service=null,tid=4,inDfs=false,inDomainDfs=false,connectionState=0,usage=2]]
07 mars 2022;14:49:50.737 [scheduling-1] ERROR o.s.i.handler.LoggingHandler - org.springframework.messaging.MessagingException: Problem occurred while synchronizing '' to local directory; nested exception is org.springframework.messaging.MessagingException: Failure occurred while copying '/test.csv' from the remote to the local directory; nested exception is org.springframework.core.NestedIOException: Failed to read resource [/test.csv].; nested exception is jcifs.smb.SmbException: The parameter is incorrect.
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:348)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource.doReceive(AbstractInboundFileSynchronizingMessageSource.java:267)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource.doReceive(AbstractInboundFileSynchronizingMessageSource.java:69)
at org.springframework.integration.endpoint.AbstractFetchLimitingMessageSource.doReceive(AbstractFetchLimitingMessageSource.java:47)
at org.springframework.integration.endpoint.AbstractMessageSource.receive(AbstractMessageSource.java:142)
at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:212)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:444)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.pollForMessage(AbstractPollingEndpoint.java:413)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$createPoller$4(AbstractPollingEndpoint.java:348)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.lambda$execute$0(ErrorHandlingTaskExecutor.java:57)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:55)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$createPoller$5(AbstractPollingEndpoint.java:341)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:95)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.springframework.messaging.MessagingException: Failure occurred while copying '/BE1_2_MOUVEMENTS_Valorisation_20211231_20220218_164451.csv' from the remote to the local directory; nested exception is org.springframework.core.NestedIOException: Failed to read resource [/BE1_2_MOUVEMENTS_Valorisation_20211231_20220218_164451.csv].; nested exception is jcifs.smb.SmbException: The parameter is incorrect.
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.copyRemoteContentToLocalFile(AbstractInboundFileSynchronizer.java:551)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.copyFileToLocalDirectory(AbstractInboundFileSynchronizer.java:488)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.copyIfNotNull(AbstractInboundFileSynchronizer.java:403)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.transferFilesFromRemoteToLocal(AbstractInboundFileSynchronizer.java:386)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.lambda$synchronizeToLocalDirectory$0(AbstractInboundFileSynchronizer.java:342)
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:452)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:341)
... 21 more
Caused by: org.springframework.core.NestedIOException: Failed to read resource [/BE1_2_MOUVEMENTS_Valorisation_20211231_20220218_164451.csv].; nested exception is jcifs.smb.SmbException: The parameter is incorrect.
at org.springframework.integration.smb.session.SmbSession.read(SmbSession.java:188)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.copyRemoteContentToLocalFile(AbstractInboundFileSynchronizer.java:545)
... 27 more
Caused by: jcifs.smb.SmbException: The parameter is incorrect.
at jcifs.smb.SmbTransportImpl.checkStatus2(SmbTransportImpl.java:1467)
at jcifs.smb.SmbTransportImpl.checkStatus(SmbTransportImpl.java:1578)
at jcifs.smb.SmbTransportImpl.sendrecv(SmbTransportImpl.java:1027)
at jcifs.smb.SmbTransportImpl.send(SmbTransportImpl.java:1549)
at jcifs.smb.SmbSessionImpl.send(SmbSessionImpl.java:409)
at jcifs.smb.SmbTreeImpl.send(SmbTreeImpl.java:472)
at jcifs.smb.SmbTreeConnection.send0(SmbTreeConnection.java:404)
at jcifs.smb.SmbTreeConnection.send(SmbTreeConnection.java:318)
at jcifs.smb.SmbTreeConnection.send(SmbTreeConnection.java:298)
at jcifs.smb.SmbTreeHandleImpl.send(SmbTreeHandleImpl.java:130)
at jcifs.smb.SmbTreeHandleImpl.send(SmbTreeHandleImpl.java:117)
at jcifs.smb.SmbFile.withOpen(SmbFile.java:1775)
at jcifs.smb.SmbFile.withOpen(SmbFile.java:1744)
at jcifs.smb.SmbFile.queryPath(SmbFile.java:793)
at jcifs.smb.SmbFile.exists(SmbFile.java:879)
at jcifs.smb.SmbFile.isFile(SmbFile.java:1102)
at org.springframework.integration.smb.session.SmbSession.read(SmbSession.java:182)
... 28 more
here is my code :
#Bean
public SmbSessionFactory smbSessionFactory() {
VaultResponse vaultResponse = vaultTemplate
.opsForKeyValue(vaultPath, VaultKeyValueOperationsSupport.KeyValueBackend.KV_2).get(vaultSecretsPath.toLowerCase());
SmbSessionFactory smbSession = new SmbSessionFactory();
smbSession.setHost(properties.getNasHost());
smbSession.setPort(properties.getNasPort());
smbSession.setDomain(properties.getNasDomain());
if (vaultResponse != null) {
Map<String, Object> data = vaultResponse.getData();
smbSession.setUsername(data != null && data.get("nasUsername") != null ? (String) data.get("nasUsername") : "");
smbSession.setPassword(data != null && data.get("nasPassword") != null ? (String) data.get("nasPassword") : "");
}
smbSession.setShareAndDir(properties.getNasShareAndDir());
smbSession.setReplaceFile(true);
smbSession.setSmbMinVersion(DialectVersion.SMB1);
smbSession.setSmbMaxVersion(DialectVersion.SMB311);
return smbSession;
}
thank you in advance,

Backup Sharepoint Online with Azure functions

Is there a way to generate a sharepoint backup online using azure functions?
I have already authenticated the tenant using managed identity
The idea would be to download all the files in the documents and upload them to an azure storage account
I used this code but I get an error:
using namespace System.Net
param($Request, $TriggerMetadata)
$TenantSiteURL = "https://tenant.sharepoint.com"
$SiteRelativeURL = "/sites/BackupSource"
$LibraryName = "Documenti Condivisi"
$DownloadPath ="\Temp\Docs"
#Connect-PnPOnline -ManagedIdentity
Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity
Write-Warning "Connesso"
#Set-Location -Path SPO:\$SiteRelativeURL
Get-PnPMicrosoft365Group
Push-OutputBinding -Name Response -Value ([HttpResponseContext]#{
StatusCode = [HttpStatusCode]::OK
})
2022-01-03T16:58:32.983 [Information] Executing 'Functions.HttpTrigger1' (Reason='This function was programmatically called via the host APIs.', Id=09c1fe95-6b6e-4e85-8c8f-815e37e99d04)
2022-01-03T16:58:40.915 [Information] OUTPUT:
2022-01-03T16:58:41.541 [Information] OUTPUT: Account SubscriptionName TenantId Environment
2022-01-03T16:58:41.542 [Information] OUTPUT: ------- ---------------- -------- -----------
2022-01-03T16:58:41.549 [Information] OUTPUT: MSI#50342 --- AzureCloud
2022-01-03T16:58:41.549 [Information] OUTPUT:
2022-01-03T16:58:43.530 [Error] ERROR: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.Exception :Type : System.Management.Automation.ParameterBindingExceptionMessage : Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.ErrorId : AmbiguousParameterSetLine : 13Offset : 1CommandInvocation :MyCommand : Connect-PnPOnlineBoundParameters :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys : …Values : …SyncRoot : …ScriptLineNumber : 13OffsetInLine : 1HistoryId : 1ScriptName : C:\home\site\wwwroot\HttpTrigger1\run.ps1Line : Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentityPositionMessage : At C:\home\site\wwwroot\HttpTrigger1\run.ps1:13 char:1+ Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1PSCommandPath : C:\home\site\wwwroot\HttpTrigger1\run.ps1InvocationName : Connect-PnPOnlinePipelineLength : 1PipelinePosition : 1CommandOrigin : InternalErrorRecord :Exception :Type : System.Management.Automation.ParentContainsErrorRecordExceptionMessage : Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.HResult : -2146233087CategoryInfo : InvalidArgument: (:) [Connect-PnPOnline], ParentContainsErrorRecordExceptionFullyQualifiedErrorId : AmbiguousParameterSet,PnP.PowerShell.Commands.Base.ConnectOnlineInvocationInfo :MyCommand : Connect-PnPOnlineScriptLineNumber : 13OffsetInLine : 1HistoryId : 1ScriptName : C:\home\site\wwwroot\HttpTrigger1\run.ps1Line : Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentityPositionMessage : At C:\home\site\wwwroot\HttpTrigger1\run.ps1:13 char:1+ Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1PSCommandPath : C:\home\site\wwwroot\HttpTrigger1\run.ps1CommandOrigin : InternalScriptStackTrace : at <ScriptBlock>, C:\home\site\wwwroot\HttpTrigger1\run.ps1: line 13TargetSite :Name : ThrowAmbiguousParameterSetExceptionDeclaringType : System.Management.Automation.CmdletParameterBinderController, System.Management.Automation, Version=7.0.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35MemberType : MethodModule : System.Management.Automation.dllStackTrace :at System.Management.Automation.CmdletParameterBinderController.ThrowAmbiguousParameterSetException(UInt32 parameterSetFlags, MergedCommandParameterMetadata bindableParameters)at System.Management.Automation.CmdletParameterBinderController.ValidateParameterSets(Boolean prePipelineInput, Boolean setDefault)at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)at System.Management.Automation.CommandProcessor.BindCommandLineParameters()at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)--- End of stack trace from previous location where exception was thrown ---at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)Data : System.Collections.ListDictionaryInternalSource : System.Management.AutomationHResult : -2146233087CategoryInfo : InvalidArgument: (:) [Connect-PnPOnline], ParameterBindingExceptionFullyQualifiedErrorId : AmbiguousParameterSet,PnP.PowerShell.Commands.Base.ConnectOnlineInvocationInfo :MyCommand : Connect-PnPOnlineScriptLineNumber : 13OffsetInLine : 1HistoryId : 1ScriptName : C:\home\site\wwwroot\HttpTrigger1\run.ps1Line : Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentityPositionMessage : At C:\home\site\wwwroot\HttpTrigger1\run.ps1:13 char:1+ Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1PSCommandPath : C:\home\site\wwwroot\HttpTrigger1\run.ps1CommandOrigin : InternalScriptStackTrace : at <ScriptBlock>, C:\home\site\wwwroot\HttpTrigger1\run.ps1: line 13Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: ERROR: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.Exception :Type : System.Management.Automation.ParameterBindingExceptionMessage : Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.ErrorId : AmbiguousParameterSetLine : 13Offset : 1CommandInvocation :MyCommand : Connect-PnPOnlineBoundParameters :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys :Length : 3Length : 15Values :Length : 30IsPresent : TrueSyncRoot :Comparer : System.OrdinalIgnoreCaseComparerCount : 2Keys : …Values : …SyncRoot : …ScriptLineNumber : 13OffsetInLine : 1HistoryId : 1ScriptName : C:\home\site\wwwroot\HttpTrigger1\run.ps1Line : Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentityPositionMessage : At C:\home\site\wwwroot\HttpTrigger1\run.ps1:13 char:1+ Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1PSCommandPath : C:\home\site\wwwroot\HttpTrigger1\run.ps1InvocationName : Connect-PnPOnlinePipelineLength : 1PipelinePosition : 1CommandOrigin : InternalErrorRecord :Exception :Type : System.Management.Automation.ParentContainsErrorRecordExceptionMessage : Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.HResult : -2146233087CategoryInfo : InvalidArgument: (:) [Connect-PnPOnline], ParentContainsErrorRecordExceptionFullyQualifiedErrorId : AmbiguousParameterSet,PnP.PowerShell.Commands.Base.ConnectOnlineInvocationInfo :MyCommand : Connect-PnPOnlineScriptLineNumber : 13OffsetInLine : 1HistoryId : 1ScriptName : C:\home\site\wwwroot\HttpTrigger1\run.ps1Line : Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentityPositionMessage : At C:\home\site\wwwroot\HttpTrigger1\run.ps1:13 char:1+ Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1PSCommandPath : C:\home\site\wwwroot\HttpTrigger1\run.ps1CommandOrigin : InternalScriptStackTrace : at <ScriptBlock>, C:\home\site\wwwroot\HttpTrigger1\run.ps1: line 13TargetSite :Name : ThrowAmbiguousParameterSetExceptionDeclaringType : System.Management.Automation.CmdletParameterBinderController, System.Management.Automation, Version=7.0.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35MemberType : MethodModule : System.Management.Automation.dllStackTrace :at System.Management.Automation.CmdletParameterBinderController.ThrowAmbiguousParameterSetException(UInt32 parameterSetFlags, MergedCommandParameterMetadata bindableParameters)at System.Management.Automation.CmdletParameterBinderController.ValidateParameterSets(Boolean prePipelineInput, Boolean setDefault)at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)at System.Management.Automation.CommandProcessor.BindCommandLineParameters()at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)--- End of stack trace from previous location where exception was thrown ---at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)Data : System.Collections.ListDictionaryInternalSource : System.Management.AutomationHResult : -2146233087CategoryInfo : InvalidArgument: (:) [Connect-PnPOnline], ParameterBindingExceptionFullyQualifiedErrorId : AmbiguousParameterSet,PnP.PowerShell.Commands.Base.ConnectOnlineInvocationInfo :MyCommand : Connect-PnPOnlineScriptLineNumber : 13OffsetInLine : 1HistoryId : 1ScriptName : C:\home\site\wwwroot\HttpTrigger1\run.ps1Line : Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentityPositionMessage : At C:\home\site\wwwroot\HttpTrigger1\run.ps1:13 char:1+ Connect-PnPOnline -Url $TenantSiteURL -ManagedIdentity+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1PSCommandPath : C:\home\site\wwwroot\HttpTrigger1\run.ps1CommandOrigin : InternalScriptStackTrace : at <ScriptBlock>, C:\home\site\wwwroot\HttpTrigger1\run.ps1: line 13Exception: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.Stack: at System.Management.Automation.CmdletParameterBinderController.ThrowAmbiguousParameterSetException(UInt32 parameterSetFlags, MergedCommandParameterMetadata bindableParameters)at System.Management.Automation.CmdletParameterBinderController.ValidateParameterSets(Boolean prePipelineInput, Boolean setDefault)at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)at System.Management.Automation.CommandProcessor.BindCommandLineParameters()at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)--- End of stack trace from previous location where exception was thrown ---at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2022-01-03T16:58:43.540 [Warning] WARNING: Connesso
2022-01-03T16:58:43.657 [Error] ERROR: There is currently no connection yet. Use Connect-PnPOnline to connect.
There is no PowerShell command available for backup and restore in SharePoint Online.
Use the recycle bin and version history.
Use a 3rd party tool for backup and restore like SharePoint farm to Azure with MABS .
Manually backup sites, lists, and libraries (Information
about manual migration of SharePoint Online
content
Create a Microsoft 365 support request (Restore options in
SharePoint Online)
Backup solutions for SharePoint online here
you can back up a SharePoint online Azure with MABS. Refer here

Powershell Set-AzDataLakeStoreItemAclEntry Error occured while sending the request

Trying to execute the following command in Powershell ISE
Set-AzDataLakeStoreItemAclEntry -Account "********" -Path "/raw2" -AceType Group -Id "******************" -Permissions All
I only have the Az module installed, no Rm
But I get the following error, any suggestions?
Set-AzDataLakeStoreItemAclEntry : Error in modifying ACL entries group:************:rwx for path /raw2.
Operation: MODIFYACLENTRIES failed with Unknown Error: An error occurred while sending the request. Source: mscorlib StackTrace: at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.DataLake.Store.WebTransport.<MakeSingleCallAsync>d__20.MoveNext().
.
Last encountered exception thrown after 5 tries. [An error occurred while sending the request.,An error occurred while sending the request.,An error occurred while sending the request.,An
error occurred while sending the request.,An error occurred while sending the request.]
[ServerRequestId:]
At line:1 char:1
+ Set-AzDataLakeStoreItemAclEntry -Account "**********" -Path "/raw2 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzDataLakeStoreItemAclEntry], AdlsException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.DataLakeStore.SetAzureDataLakeStoreItemAclEntry

Error creating vCore-based Elastic Pool using Powershell on Azure

I have already created the server and I am using the following code:
New-AzureRmSqlElasticPool -ResourceGroupName $resourcegroupname -ServerName $servername -ElasticPoolName "ElasticPool071" -VCore 1 -Edition "GeneralPurpose" -ComputeGeneration "Gen5" -InformationVariable ee -debug -ErrorVariable ErrorMessages
the ouput I am recieving is>>
Set-AzureRmSqlElasticPool : An unexpected error occured while processing the request. Tracking ID: 'a2936090-e7af-4203-be1c-9425932055f3'
At line:1 char:2
+ Set-AzureRmSqlElasticPool -ResourceGroupName $resourcegroupname -Se ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzureRmSqlElasticPool], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet.SetAzureSqlElasticPool
DEBUG: AzureQoSEvent: CommandName - Set-AzureRmSqlElasticPool; IsSuccess - False; Duration - 00:00:26.8490006; Exception - Microsoft.Rest.Azure.CloudException: An unexpected error occured while processing the request. Tracking ID: 'a2936090-e7af-
4203-be1c-9425932055f3'
at Microsoft.Azure.Management.Sql.ElasticPoolsOperations.<BeginUpdateWithHttpMessagesAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Sql.ElasticPoolsOperations.<UpdateWithHttpMessagesAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Sql.ElasticPoolsOperationsExtensions.<UpdateAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Sql.ElasticPoolsOperationsExtensions.Update(IElasticPoolsOperations operations, String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters)
at Microsoft.Azure.Commands.Sql.ElasticPool.Services.AzureSqlElasticPoolAdapter.UpsertElasticPool(AzureSqlElasticPoolModel model)
at Microsoft.Azure.Commands.Sql.ElasticPool.Cmdlet.SetAzureSqlElasticPool.PersistChanges(IEnumerable`1 entity)
at Microsoft.Azure.Commands.Sql.Common.AzureSqlCmdletBase`2.<>c__DisplayClass16_0.<ExecuteCmdlet>b__0()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ConfirmAction(String processMessage, String target, Action action)
at Microsoft.Azure.Commands.Sql.Common.AzureSqlCmdletBase`2.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
Could you please help!?
For Gen 5 Compute Generation, you must allocate a minimum of 2 vCores. For Gen 4 you can allocate 1 vCore.
Azure SQL Database vCore-based purchasing model limits for elastic pools
SQL Database pricing options

Resources