0
votes

I am developing Angular 6 & Web-API Core application & Now I have implemented Azure AD Authentication for my application. Till now authentication is successful. we are using ADAL-Angular 4 for handling the login, log-out in angular.

How to generate the access token from angular & how to identify the authenticated user has access or not. My user's, roles exist in DB, not in Azure AD.

I don't have Identity server in middle.

Please let me know.

1
With hard work and determination. Do the research. Post relevant code and your previous attempts. Explain what's wrong...miselking
It is quite a high level question. As a high-level answer: you'll need to use MSAL.js from the Angular app to do authentication with implicit flow. The API needs to use JWT authentication.juunas

1 Answers

1
votes

I have achieved this few months, forgot to share the approach.

Approach 1: Use ADAL.Js in your angular APP, it can establish direct integration between Azure AD & Angular.

Approach 2: You can use package "angular-auth-oidc-client" this is a very wonderful package and gives more functionality like [ refresh token, silent renew ]

I have used approach-2 and able to implement the authentication & authorization using Azure AD.

Thanks for your support.