question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[UWP] Login via OpenId Connect IdentityProvider - We can't connect to the service you need right now. Check your network connection or try this again later.

See original GitHub issue

Hello,

I have already implemented your sample into an external app, but i got errors while login with an openid identity provider.

To reproduce this problem I checked out your latest master, tried to reproduce this error within your solution and it also occurs there. I just changed the B2CConstants file values and everything is working for local accounts. In my Azure B2C I have created 2 identity providers for different AD’s in my signin/signup policy.

For Android and iOS everything works fine as expected, also the login with the identity provider. If I log in with the UWP App via the identity provider i get the following error:

image

In my external app, sometimes its possible to login via the identity provider if I first login with local account ⇒ logout and login again with identity provider credentials. But its not really a workaround because the error comes again on the next login.

I configured the identity provider with following documentation:

https://docs.microsoft.com/de-de/azure/active-directory-b2c/tutorial-add-identity-providers

I tried following things:

add Capabilities:

<Capabilities>
<Capability Name="internetClient" />
<uap:Capability Name="enterpriseAuthentication"/>
<Capability Name="privateNetworkClientServer"/>
<uap:Capability Name="sharedUserCertificates"/>
<uap:Capability Name="userAccountInformation"/>
<Capability Name="internetClientServer"/>
</Capabilities>

found it here: https://github.com/Azure-Samples/active-directory-b2c-xamarin-native/issues/137

And tried also setting the registry and redirect url which is created from the app during execution: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/UWP-specifics#properties-of-platformparameter-specific-to-winrt-and-uwp-corporate-network

Im not quite sure what im missing or doing wrong, hope you can help me.

Thank you!

/edit Maybe some additional information, I developed the identity provider login with a signIn/signUp (default) policy, that was working at the beginning, the error occurs only sometimes. After I changed to a only signin (default) policy, the error occurs nearly every time (only works with the workaround which i described already).

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:20

github_iconTop GitHub Comments

2reactions
jennyf19commented, Jan 25, 2021

thanks @MichaelWytek i’ve passed the information along to b2c team.

1reaction
MichaelWytekcommented, Dec 15, 2020

@jennyf19 Thanks for the input, I tried it now and its working again for me with the recommended policy type 😄.

But I was able to reproduce the “Cant connect to the service you need right now” again with following steps, also with the recommended policy type:

  • Login with my first IdentityProvider (“DF AD” which is displayed on the screenshot) => worked
  • Logout
  • Login with my first IdentityProvider (“DF AD” which is displayed on the screenshot) => worked
  • Logout
  • Login with my second IdentityProvider (“Customer AD” - red lined on the screenshot) => worked
  • Logout
  • Try to Login again on my first IP (“DF AD”) => error occurs again

Then i tried to login/logout a few times:

  • On the “Customer AD” I was able to login everytime.
  • On the “DF AD” I was not able to login again.

Maybe it is possible to have “wrong” configuration within the identityprovider? Is there any setting which can have side effects to the B2C Login which is set directly in the IdentityProvider AD? I did not understand why I was able to Login to the “DF AD” at the beginning, and since I logged into the “Customer AD” I was not able to login to the “DF AD” again.

/e tried it also on the newest master of this Project (active-directory-b2c-xamarin-native) and the login didnt work for my "DF AD "IdentityProvider, for the “Customer AD” IdentityProvider it works as well.

The good thing is that the “DF AD” is only for the test/dev Stage 😄

Thank you,

BR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xamarin Forms UWP Azure B2C IdentityProvider Login failed
If I log in with the UWP App via the identity provider i get the following error: "We can't connect to the service...
Read more >
Using a local OAuth2/OpenID Connect server with ...
We can't connect to the service you need right now. Check your network connection or try this again later. So if the code...
Read more >
We are unable to connect right now when try to activate ...
Describes an issue that triggers an error message when users try to activate Microsoft 365 Apps for enterprise. Provides a workaround.
Read more >
getting error while integrating Azure OpenId connect
Hi, I am trying to inegrate Azure openId connect AD authentication, ... Can you access the URL in a browser (with correct domain...
Read more >
Connect Your App to Microsoft Azure Active Directory
Learn how to connect your app to Microsoft Azure Active Directory using an enterprise connection.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found