AZpublic-preview-customize-azure-static-web-apps-authentication-with-a-serverless-function: Public preview: Customize Azure Static Web Apps authentication with a serverless function

Published . Last updated .

Microsoft Azure update AZpublic-preview-customize-azure-static-web-apps-authentication-with-a-serverless-function.

Azure update ID
AZpublic-preview-customize-azure-static-web-apps-authentication-with-a-serverless-function
Services
App Service
Tags
Features

Release overview

Release status
In preview
Public preview
October 2021
Product categories
Compute, Mobile, Web

You can now define a serverless function that is invoked whenever a user successfully logs in to your static web app. This function can assign custom roles to the logged in user. You can use these roles to configure route-based authorization rules; and other serverless functions in your app can also access these roles. 

This feature provides flexibility in how users are assigned custom roles in your application. Some scenarios this enables include: 

  • Assign custom roles to more than the 25 users supported by the existing built-in invitation system 

  • Query a database to determine which custom roles a user should be assigned 

  • Call the Microsoft Graph API to determine a user’s roles based on their Active Directory group membership 

  • Use claims from the identity provider to determine a user’s roles 

Learn more about this new feature in the Azure Static Web Apps documentation.