active-directory-b2c-xamarin-native: [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.


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:


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:

I tried following things:

add Capabilities:

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

found it here:

And tried also setting the registry and redirect url which is created from the app during execution:

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).

About this issue

Most upvoted comments

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

@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,


@MichaelWytek could you try updating to the recommended policy type?