SSO with Azure Ad Authentication and Role Authorization from ARC GIS Server in dot.net c# core 6.0 Framework
Loading
SSO with Azure Ad Authentication and Role Authorization from ARC GIS Server in dot.net c# core 6.0 Framework
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tuhin PaulPosted Mar 10, 2024, 5:24 PM
Implement robust error handling and logging mechanisms to capture and handle authentication errors, authorization failures, and other exceptions gracefully. Logging can aid in troubleshooting and monitoring the application's behavior.
Token Validation: Validate the access tokens received from Azure AD to ensure their authenticity and integrity. Use token validation middleware or libraries provided by Azure AD or third-party libraries like Microsoft.IdentityModel.Tokens.
Token Renewal and Expiry: Implement token renewal logic to handle token expiration gracefully. Azure AD tokens have a limited validity period, and your application should handle token renewal to ensure uninterrupted access to protected resources.
Role Mapping and Claims Transformation: Define a mapping strategy to map Azure AD roles to application-specific roles or permissions. Consider using claims transformation middleware to transform Azure AD claims into application-specific claims or roles.
Jayraj ChhayaPosted Feb 7, 2024, 7:54 AM
To implement SSO with Azure AD authentication and role authorization in a .NET Core 6.0 application that interacts with an ArcGIS Server, you can follow these steps:
Set up Azure AD authentication:
Implement role-based authorization:
Integrate with ArcGIS Server:
Here's an example of how you can configure Azure AD authentication and role authorization in a .NET Core 6.0 application:
With this setup, you can protect your controllers or actions with the [Authorize] attribute and specify the required roles:
Remember to replace "Admin" with the actual role name defined in your Azure AD tenant.