You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `isPlatformAuthorizeRequest:boolean` Is set on every request that is
sent to STS with nativeBroker=1
- `isPlatformBrokerRequest:boolean` Is set on every request that is sent
to the platform broker directly, and always set only if
`nativeAccountId` is in the cache/request
- `isNativeBroker:boolean` Is set on every successful response from the
Broker
- `BrokerErrorName` for intermittent fatal broker errors
---------
Co-authored-by: Copilot <[email protected]>
@@ -727,14 +730,19 @@ export class StandardController implements IController {
727
730
this.nativeInternalStorage,
728
731
correlationId
729
732
);
733
+
730
734
result=nativeClient
731
735
.acquireTokenRedirect(request,atrMeasurement)
732
736
.catch((e: AuthError)=>{
737
+
atrMeasurement.add({
738
+
brokerErrorName: e.name,
739
+
brokerErrorCode: e.errorCode,
740
+
});
733
741
if(
734
742
einstanceofNativeAuthError&&
735
743
isFatalNativeAuthError(e)
736
744
){
737
-
this.platformAuthProvider=undefined;// If extension gets uninstalled during session prevent future requests from continuing to attempt
745
+
this.platformAuthProvider=undefined;// If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
738
746
constredirectClient=
739
747
this.createRedirectClient(correlationId);
740
748
returnredirectClient.acquireToken(request);
@@ -845,6 +853,9 @@ export class StandardController implements IController {
@@ -855,17 +866,20 @@ export class StandardController implements IController {
855
866
.then((response)=>{
856
867
atPopupMeasurement.end({
857
868
success: true,
858
-
isNativeBroker: true,
859
869
accountType: getAccountType(response.account),
860
870
});
861
871
returnresponse;
862
872
})
863
873
.catch((e: AuthError)=>{
874
+
atPopupMeasurement.add({
875
+
brokerErrorName: e.name,
876
+
brokerErrorCode: e.errorCode,
877
+
});
864
878
if(
865
879
einstanceofNativeAuthError&&
866
880
isFatalNativeAuthError(e)
867
881
){
868
-
this.platformAuthProvider=undefined;// If extension gets uninstalled during session prevent future requests from continuing to attempt
882
+
this.platformAuthProvider=undefined;// If extension gets uninstalled during session prevent future requests from continuing to continuing to attempt platform broker calls
869
883
constpopupClient=
870
884
this.createPopupClient(correlationId);
871
885
returnpopupClient.acquireToken(request,pkce);
@@ -1018,10 +1032,17 @@ export class StandardController implements IController {
1018
1032
letresult: Promise<AuthenticationResult>;
1019
1033
1020
1034
if(this.canUsePlatformBroker(validRequest)){
1035
+
this.ssoSilentMeasurement?.add({
1036
+
isPlatformBrokerRequest: true,
1037
+
});
1021
1038
result=this.acquireTokenNative(
1022
1039
validRequest,
1023
1040
ApiId.ssoSilent
1024
1041
).catch((e: AuthError)=>{
1042
+
this.ssoSilentMeasurement?.add({
1043
+
brokerErrorName: e.name,
1044
+
brokerErrorCode: e.errorCode,
1045
+
});
1025
1046
// If native token acquisition fails for availability reasons fallback to standard flow
0 commit comments