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

URL null Extracting SPOApp #148

Closed
jfrobichaud opened this issue Jul 12, 2019 · 9 comments
Closed

URL null Extracting SPOApp #148

jfrobichaud opened this issue Jul 12, 2019 · 9 comments
Assignees
Labels
Bug Something isn't working

Comments

@jfrobichaud
Copy link

Hi I'm having issues with Extracting SPOApp using the version 1.0.0.773 of the module.

Extracting SPOApp...
System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Url' because it is
null.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exc
eption)
at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(ScriptBlockClauseToInvoke clauseToInvoke, Boolean crea teLocalScope, Dictionary2 functionsToDefine, List1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Obj ect dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args) at System.Management.Automation.ScriptBlock.<>c__DisplayClass57_0.<InvokeWithPipe>b__0() at System.Management.Automation.Runspaces.RunspaceBase.RunActionIfNoRunningPipelinesWithThreadCheck(Action action) at System.Management.Automation.ScriptBlock.InvokeWithPipe(Boolean useLocalScope, ErrorHandlingBehavior errorHandling Behavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Boolean p ropagateAllExceptionsToTop, List1 variablesToDefine, Dictionary`2 functionsToDefine, Object[] args)
at System.Management.Automation.ScriptBlock.InvokeUsingCmdlet(Cmdlet contextCmdlet, Boolean useLocalScope, ErrorHandl
ingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Object[] args)
at Microsoft.PowerShell.Commands.InvokeExpressionCommand.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()

@NikCharlebois NikCharlebois added the Bug Something isn't working label Jul 12, 2019
@NikCharlebois
Copy link
Collaborator

When trying to extract only the SPOApps with the provided credentials on the tenant, I actually get a different error:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: value
at Newtonsoft.Json.Linq.Extensions.Value[T,U](IEnumerable1 value) at OfficeDevPnP.Core.AuthenticationManager.<AcquireTokenAsync>d__31.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 OfficeDevPnP.Core.AuthenticationManager.EnsureAzureADCredentialsToken(String resourceUri, String userPrincipalName, String userPassword) at OfficeDevPnP.Core.AuthenticationManager.<>c__DisplayClass30_0.<GetAzureADCredentialsContext>b__0(Object sender, WebRequestEventArgs args) at Microsoft.SharePoint.Client.ClientRuntimeContext.OnExecutingWebRequest(WebRequestEventArgs args) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at OfficeDevPnP.Core.PnPClientContext.<>c__DisplayClass12_0.<ConvertFrom>b__0(Object oSender, WebRequestEventArgs webRequestEventArgs) at System.EventHandler1.Invoke(Object sender, TEventArgs e)
at Microsoft.SharePoint.Client.ClientRuntimeContext.OnExecutingWebRequest(WebRequestEventArgs args)
at Microsoft.SharePoint.Client.ClientContext.GetWebRequestExecutor()
at Microsoft.SharePoint.Client.ClientContext.d__b.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.SharePoint.Client.ClientContext.d__8.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.SharePoint.Client.ClientContext.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.SharePoint.Client.ClientContextExtensions.d__7.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.SharePoint.Client.ClientContextExtensions.ExecuteQueryRetry(ClientRuntimeContext clientContext, Int32 retryCount, Int32 delay, String userAgent)
at SharePointPnP.PowerShell.Commands.Base.SPOnlineConnectionHelper.InstantiateSPOnlineConnection(Uri url, PSCredential credentials, PSHost host, Boolean currentCredentials, Int32 minimalHealthScore, Int32 retryCount, Int32 retryWait, Int32 requestTimeout, String tenantAdminUrl, Boolean disableTelemetry, Boolean skipAdminCheck, ClientAuthenticationMode authenticationMode)
at SharePointPnP.PowerShell.Commands.Base.ConnectOnline.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()

@NikCharlebois NikCharlebois self-assigned this Jul 12, 2019
@jfrobichaud
Copy link
Author

Hi I'm having a similar issue with version 1.0.0.744

PS C:\WINDOWS\system32> Install-Module Office365DSC -RequiredVersion 1.0.0.744 -force
PS C:\WINDOWS\system32> Import-Module Office365DSC -RequiredVersion 1.0.0.744 -Force
.
PS C:\WINDOWS\system32> Export-O365Configuration

  • Prompting for credentials with MFA for AzureAD
    Extracting SPOApp...
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Argum
    entNullException: Value cannot be null.
    Parameter name: value
    at Newtonsoft.Json.Linq.Extensions.Value[T,U](IEnumerable1 value) at OfficeDevPnP.Core.AuthenticationManager.<AcquireTokenAsync>d__31.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 OfficeDevPnP.Core.AuthenticationManager.EnsureAzureADCredentialsToken(String resourceUri, String userPrincipalName , String userPassword) at OfficeDevPnP.Core.AuthenticationManager.<>c__DisplayClass30_0.<GetAzureADCredentialsContext>b__0(Object sender, We bRequestEventArgs args) at Microsoft.SharePoint.Client.ClientRuntimeContext.OnExecutingWebRequest(WebRequestEventArgs args) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters , CultureInfo culture) at OfficeDevPnP.Core.PnPClientContext.<>c__DisplayClass12_0.<ConvertFrom>b__0(Object oSender, WebRequestEventArgs web RequestEventArgs) at System.EventHandler1.Invoke(Object sender, TEventArgs e)
    at Microsoft.SharePoint.Client.ClientRuntimeContext.OnExecutingWebRequest(WebRequestEventArgs args)
    at Microsoft.SharePoint.Client.ClientContext.GetWebRequestExecutor()
    at Microsoft.SharePoint.Client.ClientContext.d__b.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.SharePoint.Client.ClientContext.d__8.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.SharePoint.Client.ClientContext.d__4.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.SharePoint.Client.ClientContextExtensions.d__7.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.SharePoint.Client.ClientContextExtensions.ExecuteQueryRetry(ClientRuntimeContext clientContext, Int32 re
    tryCount, Int32 delay, String userAgent)
    at SharePointPnP.PowerShell.Commands.Base.SPOnlineConnectionHelper.InstantiateSPOnlineConnection(Uri url, PSCredentia
    l credentials, PSHost host, Boolean currentCredentials, Int32 minimalHealthScore, Int32 retryCount, Int32 retryWait, Int
    32 requestTimeout, String tenantAdminUrl, Boolean disableTelemetry, Boolean skipAdminCheck, ClientAuthenticationMode aut
    henticationMode)
    at SharePointPnP.PowerShell.Commands.Base.ConnectOnline.ProcessRecord()
    at System.Management.Automation.CommandProcessor.ProcessRecord()

@NikCharlebois
Copy link
Collaborator

@jfrobichaud is it working now? I see that you closed the issue shortly after reporting another error?

@jfrobichaud
Copy link
Author

Hi, no it is not working, I closed the issue by mistake sorry.

The error seem different this time

@jfrobichaud jfrobichaud reopened this Jul 18, 2019
@NikCharlebois
Copy link
Collaborator

Before we go any further, try deleting all dependencies from the WindowsPowershell\modules folder and re-run a fresh install-module. I want to rule out version conflicts in the MSCloudLoginAssistant.

@NikCharlebois
Copy link
Collaborator

What happens if you run:

Connect-PnPOnline -Url -UseWebLogin

Pass in MFA credentials, then run

Get-PnPTenantAppCatalogUrl

? DO you get a url back? Is there even an App Catalog generated for the tenant?

@NikCharlebois
Copy link
Collaborator

We are aware of the issue when using an MFA enabled account. The underlying issue is coming from the fact that when PnP challenges for MFA, it actually throws a generic error which is not properly handled by the MSCloudLoginAssistant version 0.5.5. A PR is in the Queue to be reviewed and merged at:
microsoft/MSCloudLoginAssistant#4

@larryeby
Copy link

larryeby commented Sep 9, 2019

Any updates on this?

@NikCharlebois
Copy link
Collaborator

@larryeby this should have been fixed with the latest version released in August. Please let me know if you are still facing this issue using that version. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants