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.

Error. We're having trouble signing you in. Please sign in again. Unauthorized

See original GitHub issue

When I try to Access the To-do list I get the following message.

It finds my claim just fine, and it says I’m signed in.

Web.config:

<add key="ida:Tenant" value="b2cmax.onmicrosoft.com" />
<add key="ida:ClientId" value="2f4c85d0-6471-4080-a73c-b7e7811f273b" />
<add key="ida:ClientSecret" value="--removed--" />
<add key="ida:AadInstance" value="https://login.microsoftonline.com/tfp/{0}/{1}/v2.0/.well-known/openid-configuration" />
<add key="ida:RedirectUri" value="https://localhost:44316/" />

<add key="ida:SignUpSignInPolicyId" value="b2c_1_susi" />
<add key="ida:EditProfilePolicyId" value="b2c_1_profile_edit" />
<add key="ida:ResetPasswordPolicyId" value="b2c_1_p_reset" />

<!-- Uncomment the localhost url if you want to run the API locally -->
<!--<add key="api:TaskServiceUrl" value="https://aadb2cplayground.azurewebsites.net/" /> -->
<add key="api:TaskServiceUrl" value="https://localhost:44332/" />

<!-- The following settings is used for requesting access tokens -->
<add key="api:ApiIdentifier" value="https://b2cmax.onmicrosoft.com/tasks/" />
<add key="api:ReadScope" value="read" />
<add key="api:WriteScope" value="write" />`

Do I need to make any changes to TaskService Web Config?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
dblaszykcommented, Oct 6, 2017

Please note, I saw this when I forgot the trailing /, for the api:ApiIdentifier.

… key=“api:ApiIdentifier” value=“https://forexample.onmicrosoft.com/myapi

Must be … key=“api:ApiIdentifier” value=“https://forexample.onmicrosoft.com/myapi/

Since the scopes are created by appending the security token, I was getting myapiread, as opposed to myapi/read in the code example.

0reactions
dbman86commented, Mar 4, 2021

I had same issue - I went to the WebApp app registration and needed to grant admin consent - before I did the status said something else and was not green. otherwise put a breakpoint in TasksController.Index() when it calls cca.AcquireTokenSilent - does result.AccessToken have a value? it was null for me until I made the change below. hope this helps.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sorry, but we're having trouble signing you in - Office 365
Discusses an error message that users receive when they try to sign in to a Microsoft cloud service such as Microsoft 365, Azure, ......
Read more >
I'm having trouble signing in : - Support :
I entered my password and it tells me "Unauthorized Request". This means your email or password was incorrect. Double check your information and ......
Read more >
Troubleshoot account sign-in issues - YouTube TV Help
If you're having trouble signing up or signing in to YouTube TV, you may be signed in to a Brand Account. Brand Accounts...
Read more >
Netflix says 'Sorry, we had trouble logging you in. Request ...
Netflix says 'Sorry, we had trouble logging you in. Request Failed: Unauthorized (401).' ... It typically points to a software or Internet connectivity...
Read more >
Resolve issues signing in to your AWS console
Note: If you can sign in to your AWS account, but are having trouble connecting to an Amazon Elastic Compute Cloud (Amazon EC2)...
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