endpointsystems / azure.b2c.demos.groupauthorization Goto Github PK
View Code? Open in Web Editor NEWUsing Azure AD groups from Azure AD B2C for authorization purposes within a web app.
License: Apache License 2.0
Using Azure AD groups from Azure AD B2C for authorization purposes within a web app.
License: Apache License 2.0
We are trying to implement this in webassembly blazor(Azure b2c) - which has api, server and client projects.
Could you be able to suggest what are we missing here!?--
System.ArgumentException
HResult=0x80070057
Message='authority' Uri should have at least one segment in the path (i.e. https:////...) (Parameter 'authority')
Source=Microsoft.IdentityModel.Clients.ActiveDirectory
StackTrace:
at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Instance.Authenticator.DetectAuthorityType(String authority)
at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Instance.Authenticator.Init(IServiceBundle serviceBundle, String authority, Boolean validateAuthority)
at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Instance.Authenticator..ctor(IServiceBundle serviceBundle, String authority, Boolean validateAuthority)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext..ctor(IServiceBundle serviceBundle, String authority, AuthorityValidationType validateAuthority, TokenCache tokenCache, IHttpClientFactory httpClientFactory)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext..ctor(String authority)
at downtown.api.AuthRoleService.GroupAuthService..ctor(IOptions1 graphConfig, ILoggerFactory loggerFactory) in C:\dev\downtown_b\downtown.api\AuthRoleService\GroupAuthService.cs:line 38 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.b__0(ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.d__5.MoveNext()
Is there a way for the code to be able to use this in Controllers or Views.
I need to change views based on the user group access.
I have created users in AD B2C and assigned them in Group but this is not comming in the Token so I assume Graph API needs to be used.
Let me know your thoughts.
Steve
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.