09-02-23 07:01 PM
I have been trying to use the MSAL (2.1.0) VBO to authenticate with a registered app to access the Graph API. I am unable to perform any action as they all result in the same error message:
Internal : Could not execute code stage because exception thrown by code stage: One or more errors occurred.
I am unable to dig any deeper due to the generic message it returns. I have not modified the VBO in any way and have made sure these prerequisites are installed:
I am at a loss as to where to look next as there doesn't seem to be any discussion around this yet. I have even installed this VBO in a fresh installation of Blue Prism 6.9 just to make sure there aren't existing conflictions in our DEV area. What am I missing?
09-02-23 10:59 PM
This is due to an AggregateException being thrown. You should be able to capture it by adding an additional catch like this:
catch (AggregateException err) {
Exception = err.ToString();
}
Just add the above code snippet immediately after the close curly brace of the MsalServiceException catch block.
Cheers,
29-11-23 08:54 AM
Hi @ewilson,
I'm facing MSAL Authentication issue with the below error. I imported the MSAL.NET v2.2 version with the dll. I have performed the prerequisites as mentioned in the Guide. Can you help me to resolve the issue.
MSAL.Desktop.4.42.1.0.MsalServiceException:
ErrorCode: request_timeout
Microsoft.Identity.Client.MsalServiceException: Request to the endpoint timed out. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Platforms.net45.Http.DnsSensitiveClientHandler.<SendAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Http.HttpManager.<ExecuteAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Http.HttpManager.<ExecuteWithRetryAsync>d__12.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.Identity.Client.Internal.Requests.RequestBase.<HandleTokenRefreshErrorAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Identity.Client.Internal.Requests.ClientCredentialRequest.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.<RunAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.ApiConfig.Executors.ConfidentialClientExecutor.<ExecuteAsync>d__3.MoveNext()
Inner Exception: System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Platforms.net45.Http.DnsSensitiveClientHandler.<SendAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Http.HttpManager.<ExecuteAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Http.HttpManager.<ExecuteWithRetryAsync>d__12.MoveNext()
StatusCode: 0
ResponseBody:
Headers:
29-11-23 01:58 PM
Hello @Amrutha Sivarajan,
We're going to need more information.
Cheers,
30-11-23 03:16 AM
Thank you @ewilson for the swift response.
Below are details you have asked for:
1. We are using BP7.0 and have configured the Azure as mentioned in the User Guide.
2. At the stage for Authentication, when it calls the 'Get Auth Token - Client Secret' action, it takes a while to execute and returns the above error message.
3. Screenshots below:
18-12-23 03:53 PM
Apologies for the delayed response. Since this is the first action you're calling on the VBO, my guess is the request is being blocked somehow. In other words, the MSAL.NET DLL, which makes the actual network request, is failing to find a network path to Azure. Do you traverse a proxy or anything like that?
Cheers,
19-12-23 04:14 AM
Thank you very much for your prompt reply.
Your insight was correct. As the mailbox is shared and necessitates shared permissions, and the proxy must be open for the URLs, I have successfully resolved the authentication issue by opening the firewall and configuring the proxy for the URL.
I appreciate you taking the time to resolve this matter.