Using BlazorServer Core 6 with single sign on from Company AD, how do I use that to authenticate/authorize with local SQL DB for roles/policies

Andersson, Johan 1 Reputation point
2022-11-21T17:01:21.507+00:00

so, BlazorServer app on Core 6
Using AD as single signon via IIS to app, gets the context.identity.user.name correct with domain/sAMAccountName set as the string.

But it's only valid within the [AuthorizeView][Authorized]

I also have a lot of roles defined, with corresponding AD connections, in a local Identity system which I can query via OData or SQL

how do I keep track of the user in the @Aidan Wick field? do I [Authorize] there to or? I don't see any examples of that
or do I need to create local identities from those contexts?

I would like to use the roles that are defined, with members, from my Identity system to authorize the authenticated users to my various places in the blazor pages and code.

but frankly, I don't understand how I would make that happen with this setup?

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,389 questions
Windows Server Security
Windows Server Security
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
1,721 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,552 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Andersson, Johan 1 Reputation point
    2022-11-22T08:13:08.617+00:00

    Ok,
    I apparently have a lot more reading to do...
    yes, I understand how the roles/policies are used once you have them defined.

    I will check to see if I can find examples on how to use the AuthenticationState to catch the user principal and when.

    Almost all the examples I can find seems to build their own userstore/roles in the application, which is not what I want, unless it is a must.

    I will read that document again and see if it enlightens me on the subject.

    0 comments No comments