Base solution for your next web application

Activities of "Astech"

We are using MicrosoftIdentity and Microsoft Graph to sign in our users: MVC Project - AuthConfigurer: Everything is working fine, users can sign in, use Graph and [AbpUserLogins] is being populated: But [AbpUserTokens] is not being populated with the access token:

I have tried to insert the token manually, but the constructor for UserToken is protected:

Can anyone tell me how we should be putting the token into AbpUserTokens? We can create our own similar table to do the same thing but seems unnecesary if there is already the functioanlity to push the access tokens in in ABP.

Thanks,

Morning @ismcagdas,

That's great, thank you very much for your reply.

All the best

Hi,

With the people behind Moment.js even advising against using it, are there any plans to remove from ASP Net Zero? Or could be remove ourselves without any significant loss in functionality around subscriptions, notifications etc? The payload of both moment with locales and data are causing our bundle size to be much larger than it should be.

Thanks

Thanks for your reply ismcagdas

We are wanting to implement Microsoft Graph and believe this requires authenitcation through AddMicrosoftIdentityWebApp instead of OpenId does it not? We can get AD working fine and can login users. It is the Graph element that we are struggling with.

Hi @ismcagdas

We don't have the OpenID section of our appsettings enabled or configured as we were under the impression this is configured through this:

As per the instructions in approach 2 here: https://community.abp.io/posts/how-to-use-the-azure-active-directory-authentication-for-mvc-razor-page-applications-4603b9cf?_ga=2.167438713.612361716.1679501585-1726878413.1679501585

Is this correct?

Thank you Scott

We are trying to get Graph integrated into our version 12 ABP ASP Net Zero (.Net Core MVC)

We have AD working fine after following method 2 of the following: https://community.abp.io/posts/how-to-use-the-azure-active-directory-authentication-for-mvc-razor-page-applications-4603b9cf?_ga=2.167438713.612361716.1679501585-1726878413.1679501585

Our Configure method in AuthConfigurer looks like so:

And our app settings:

However, when we call the graphclient, for example:

We get the following error: ---> System.InvalidOperationException: IDW10503: Cannot determine the cloud Instance. The provided authentication scheme was ''. Microsoft.Identity.Web inferred 'Identity.Application' as the authentication scheme. Available authentication schemes are 'Identity.Application,Identity.External,Identity.TwoFactorRememberMe,Identity.TwoFactorUserId,idsrv,idsrv.external,Cookies,OpenIdConnect,Bearer,IdentityBearerIdentityServerAuthenticationJwt,IdentityBearerIdentityServerAuthenticationIntrospection,IdentityBearer'. See https://aka.ms/id-web/authSchemes. at Microsoft.Identity.Web.TokenAcquisitionAspnetCoreHost.GetOptions(String authenticationScheme, String& effectiveAuthenticationScheme) at Microsoft.Identity.Web.TokenAcquisition.GetAuthenticationResultForUserAsync(IEnumerable1 scopes, String authenticationScheme, String tenantId, String userFlow, ClaimsPrincipal user, TokenAcquisitionOptions tokenAcquisitionOptions) at Microsoft.Identity.Web.DefaultAuthorizationHeaderProvider.CreateAuthorizationHeaderForUserAsync(IEnumerable1 scopes, AuthorizationHeaderProviderOptions downstreamApiOptions, ClaimsPrincipal claimsPrincipal, CancellationToken cancellationToken)

The AD part is working fine and a user can create a account and login with their Microsoft account. It is just the Graph part that is not working. Anyone any ideas? Thanks

Changed our minds and decided to just clear the cache on feature update. This way we get instant change and keep the benefits of the cache manager normally:

We have resolved this by moving the GetEditionValueOrNull and GetEditionValueOrNullAsync methods from the FeatureStore up into the EditionManager. We have then stopped using the cache manager and just doing a call to the repository to get the value everytime. This is getting rid of the cache manager and related issue:

<br>

Thanks @ismcagdas

I have narrowed the problem down to AbpFeatureValueStore. I have moved all methods to our own FeatureValueStore so we can debug and make any necessary changes.

I can see that a cache is being used for the retreival of setting values and I think this may be the issue. Is there a way of disabling this or perhaps forcing a re-get of the value? And would this have any negative effects on perofrmance?

Thanks

Possibly related to https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1433

and https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1574 ?

Showing 11 to 20 of 72 entries