adal
2 TopicsAzure - AADSTS50058 error
Hello, We have angular application running using electron on chromium browser and ADAL framework for login. Also it's integrated with Fusion application, so when user is logged in and tries to navigate to Fusion 2020 application, creates design and exits Fusion and it takes to the angular application to save the design to our database. So save fails. But user is getting below error: AADSTS50058: A silent sign-in request was sent but none of the currently signed in user(s) match the requested login hint. We have checked many possibilities: 1. Refresh policies 2. Check account on Office 365 3. Azure AD shows success on Audit logs 4. Both UPN and email are same 5. Added 'https://login.microsoftonline.com/ on trusted sites Please suggest.2.6KViews0likes0CommentsError using ADAL in Android app for Teams
I have developed a SharePoint WebPart that I'm using in Teams. This WebPart obtains, using ADAL, a token to validate the user. This application works fine in Sharepoint, Teams (online & desktop app) but when I try to execute this WebPart inside the Android app for Teams I have this error: I don't know if I need a special certificate in this case... 04-28 13:10:13.913 8456 8763 I OpenGLRenderer: Davey! duration=1870ms; Flags=1, IntendedVsync=187039755963, Vsync=187739755935, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=187755761281, AnimationStart=187755814874, PerformTraversalsStart=187756295135, DrawStart=188864679249, SyncQueued=188871540812, SyncStart=188872232895, IssueDrawCommandsStart=188874670916, SwapBuffers=188907635343, FrameCompleted=188911356593, DequeueBufferDuration=227000, QueueBufferDuration=2864000, 04-28 13:10:13.935 8456 8456 I PersonalAppsPagerAdapter: ProcessId: 8456, Thread: main, TabID: 14d6962d-6eeb-4f48-8890-de55454bb136 badge count: 0 04-28 13:10:13.959 8456 8456 I PersonalAppsPagerAdapter: ProcessId: 8456, Thread: main, TabID: 20c3440d-c67e-4420-9f80-0e50c39693df badge count: 0 04-28 13:10:13.965 8456 8456 I PersonalAppsPagerAdapter: ProcessId: 8456, Thread: main, TabID: 86fcd49b-61a2-4701-b771-54728cd291fb badge count: 0 04-28 13:10:13.968 8456 8456 E AuthorizationService_GetResourceTokenAction: ProcessId: 8456, Thread: main, onError04-28 13:10:13.968 8456 8456 E AuthorizationService_GetResourceTokenAction: com.microsoft.aad.adal.AuthenticationException: Request authority:https://login.microsoftonline.com/common clientid:1fec8e78-bce4-4aaf-ab1b-5451cc387264 No result returned from acquireTokenSilent 04-28 13:10:13.968 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.microsoft.aad.adal.AcquireTokenRequest.tryAcquireTokenSilent(AcquireTokenRequest.java:394) 04-28 13:10:13.968 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.microsoft.aad.adal.AcquireTokenRequest.performAcquireTokenRequest(AcquireTokenRequest.java:356) 04-28 13:10:13.968 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.microsoft.aad.adal.AcquireTokenRequest.access$200(AcquireTokenRequest.java:55) 04-28 13:10:13.968 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.microsoft.aad.adal.AcquireTokenRequest$1.run(AcquireTokenRequest.java:129) 04-28 13:10:13.968 8456 8456 E AuthorizationService_GetResourceTokenAction: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 04-28 13:10:13.968 8456 8456 E AuthorizationService_GetResourceTokenAction: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 04-28 13:10:13.968 8456 8456 E AuthorizationService_GetResourceTokenAction: at java.lang.Thread.run(Thread.java:919) 04-28 13:10:13.970 8456 8456 W AuthorizationService_GetResourceTokenAction: ProcessId: 8456, Thread: main, com.microsoft.aad.adal.AuthenticationException: Request authority:https://login.microsoftonline.com/ 04-28 13:10:13.972 8456 8456 E acquire_resource_token_from_authsdk: ProcessId: 8456, Thread: main, Scenario has already ended for stepId eb376f5c-dddd-yyyy-xxx-112532bc4868 for scenario acquire_resource_token_from_authsdk 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: ProcessId: 8456, Thread: main, com.microsoft.aad.adal.AuthenticationException: Request authority:https://login.microsoftonline.com/ 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: com.microsoft.skype.teams.services.authorization.AuthorizationError: com.microsoft.aad.adal.AuthenticationException: Request authority:https://login.microsoftonline.com/ 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.microsoft.skype.teams.services.authorization.actions.GetResourceTokenAction$4.onError(GetResourceTokenAction.java:322) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.microsoft.skype.teams.services.authorization.adal.AdalAuthenticationProvider$2.onError(AdalAuthenticationProvider.java:352) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.microsoft.aad.adal.AcquireTokenRequest$CallbackHandler$1.run(AcquireTokenRequest.java:991) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at android.os.Handler.handleCallback(Handler.java:883) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at android.os.Handler.dispatchMessage(Handler.java:100) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at android.os.Looper.loop(Looper.java:214) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at android.app.ActivityThread.main(ActivityThread.java:7397) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at java.lang.reflect.Method.invoke(Native Method) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: Caused by: com.microsoft.aad.adal.AuthenticationException: Request authority:https://login.microsoftonline.com/common clientid:1fec8e78-b222-222f-a22b-514512382264 No result returned from acquireTokenSilent 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.microsoft.aad.adal.AcquireTokenRequest.tryAcquireTokenSilent(AcquireTokenRequest.java:394) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.microsoft.aad.adal.AcquireTokenRequest.performAcquireTokenRequest(AcquireTokenRequest.java:356) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.microsoft.aad.adal.AcquireTokenRequest.access$200(AcquireTokenRequest.java:55) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at com.microsoft.aad.adal.AcquireTokenRequest$1.run(AcquireTokenRequest.java:129) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 04-28 13:10:13.974 8456 8456 E AuthorizationService_GetResourceTokenAction: at java.lang.Thread.run(Thread.java:919) 04-28 13:10:13.998 8456 8456 I MainActivity: ProcessId: 8456, Thread: main, Google Play Services connection is successful. 04-28 13:10:13.999 8456 8456 I Choreographer: Skipped 74 frames! The application may be doing too much work on its main thread. 04-28 13:10:14.007 8456 9484 I DpmTcmClient: RegisterTcmMonitor from: $Proxy004-28 13:10:14.085 8456 11589 E TranslatorMessageUtilities: ProcessId: 8456, Thread: pool-1-thread-44, GetTranslationSupportedLanguages: unsuccessful. Error message:User is not authorized.. Response Code:401 04-28 13:10:14.199 8456 8763 I OpenGLRenderer: Davey! duration=1440ms; Flags=0, IntendedVsync=187756436031, Vsync=188989769315, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=188997886332, AnimationStart=188998025082, PerformTraversalsStart=189060853832, DrawStart=189182806488, SyncQueued=189187391072, SyncStart=189187852218, IssueDrawCommandsStart=189189284718, SwapBuffers=189194257374, FrameCompleted=189197163728, DequeueBufferDuration=221000, QueueBufferDuration=1885000, 04-28 13:10:14.275 8456 8456 I com.microsoft.skype.teams.calendar.viewmodels.MeetingsViewModel: ProcessId: 8456, Thread: main, Loading meeting event list. Force refresh: false 04-28 13:10:14.276 8456 11658 D skia : --- Failed to create image decoder with message 'unimplemented' 04-28 13:10:14.280 8456 11658 I chatty : uid=10136(com.microsoft.teams) FrescoIoBoundEx identical 16 lines04-28 13:10:14.280 8456 11658 D skia : --- Failed to create image decoder with message 'unimplemented' 04-28 13:10:14.280 8456 9608 I com.microsoft.skype.teams.calendar.viewmodels.MeetingsViewModel: ProcessId: 8456, Thread: Pool-ViewData-Thread-3, setViewState is called with false isError value and 0 item count This is my code: // Obtaining loginName from Sharepoint context let loginName = this.context.pageContext.user.loginName; let source = Sources.sharepoint; // Obtaining loginName from Teams context if (this.context.sdks.microsoftTeams) { loginName = this.context.sdks.microsoftTeams.context.loginHint; source = Sources.teams; } // Obtaining token provider let tp = await this.context.aadTokenProviderFactory.getTokenProvider(); let config = tp["_defaultConfiguration"]; let aadInstanceUrl = config.aadInstanceUrl[length - 1] === "/" ? config.aadInstanceUrl : config.aadInstanceUrl + "/"; // Config context let ctx = new AuthenticationContext({ tenant: tenantId, clientId: clientId, instance: aadInstanceUrl, redirectUri: config.redirectUri, extraQueryParameter: "login_hint=" + encodeURIComponent(loginName), loadFrameTimeout: 60000 }); // Check user let cu = ctx.getCachedUser();console.log("USER", cu, loginName, ctx); if (cu && cu.userName.toLowerCase() !== loginName.toLowerCase()) { console.log("Clean user cache"); ctx.clearCache(); } // Login processconsole.log("Login process"); // Obtaining Azure AD Token let azureADToken = this.acquireToken(ctx, clientId); Could somebody give me a clue to solve this? Thanks!1.3KViews0likes0Comments