From 436c8a9777dc23955bbd00147550bb16f0e2aec2 Mon Sep 17 00:00:00 2001 From: Hugo Batista <64972114+0x6f677548@users.noreply.github.com> Date: Tue, 11 Jul 2023 12:07:52 +0100 Subject: [PATCH 1/2] added support to saml apps and AAD sign-in --- .gitignore | 1 + .../AADSignUpOrSigninSAML.xml | 39 ++++ SocialAndLocalAccounts/SignUpOrSigninSAML.xml | 38 ++++ .../TrustFrameworkExtensions.xml | 176 +++++++++++++++++- 4 files changed, 246 insertions(+), 8 deletions(-) create mode 100644 SocialAndLocalAccounts/AADSignUpOrSigninSAML.xml create mode 100644 SocialAndLocalAccounts/SignUpOrSigninSAML.xml diff --git a/.gitignore b/.gitignore index f1e3d20..c727b84 100644 --- a/.gitignore +++ b/.gitignore @@ -250,3 +250,4 @@ paket-files/ # JetBrains Rider .idea/ *.sln.iml +.DS_Store diff --git a/SocialAndLocalAccounts/AADSignUpOrSigninSAML.xml b/SocialAndLocalAccounts/AADSignUpOrSigninSAML.xml new file mode 100644 index 0000000..d992525 --- /dev/null +++ b/SocialAndLocalAccounts/AADSignUpOrSigninSAML.xml @@ -0,0 +1,39 @@ + + + + + yourtenant.onmicrosoft.com + B2C_1A_TrustFrameworkExtensions + + + + + + + + + + + + + + PolicyProfile + + + + + + + + + + + + + diff --git a/SocialAndLocalAccounts/SignUpOrSigninSAML.xml b/SocialAndLocalAccounts/SignUpOrSigninSAML.xml new file mode 100644 index 0000000..7bb94ca --- /dev/null +++ b/SocialAndLocalAccounts/SignUpOrSigninSAML.xml @@ -0,0 +1,38 @@ + + + + + yourtenant.onmicrosoft.com + B2C_1A_TrustFrameworkExtensions + + + + + + + + + + + + + + PolicyProfile + + + + + + + + + + + + + diff --git a/SocialAndLocalAccounts/TrustFrameworkExtensions.xml b/SocialAndLocalAccounts/TrustFrameworkExtensions.xml index 8e1aff3..5ae327c 100644 --- a/SocialAndLocalAccounts/TrustFrameworkExtensions.xml +++ b/SocialAndLocalAccounts/TrustFrameworkExtensions.xml @@ -1,19 +1,19 @@  - + yourtenant.onmicrosoft.com B2C_1A_TrustFrameworkLocalization - - + + @@ -35,7 +35,7 @@ Local Account SignIn - + ProxyIdentityExperienceFrameworkAppId IdentityExperienceFrameworkAppId @@ -48,10 +48,170 @@ + + Token Issuer + + + + + Token Issuer + + SAML2 + + https://yourtenant.onmicrosoft.com/samlapp + + + + + + + + + + + + + Session Management Provider + + + + + + + + Contoso + Login using Contoso + + + Contoso Employee + Login with your Contoso account + + + https://login.microsoftonline.com/tenant-name.onmicrosoft.com/v2.0/.well-known/openid-configuration + 00000000-0000-0000-0000-000000000000 + code + openid profile + form_post + POST + false + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + objectId + SkipThisOrchestrationStep + + + + + + + + + + + + + authenticationSource + localAccountAuthentication + SkipThisOrchestrationStep + + + + + + + + + + + + objectId + SkipThisOrchestrationStep + + + + + + + + + + + + authenticationSource + socialIdpAuthentication + SkipThisOrchestrationStep + + + + + + + + + + + objectId + SkipThisOrchestrationStep + + + + + + + + + + + + + + + From 76228ed89e9d32f35c9d8142d5ebc20098e4d4c7 Mon Sep 17 00:00:00 2001 From: Hugo Batista <64972114+0x6f677548@users.noreply.github.com> Date: Tue, 11 Jul 2023 12:27:27 +0100 Subject: [PATCH 2/2] added documentation for the saml and aad support changes --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 15b4043..8f47089 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,11 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope ## Change log +### 11 July 2023 +The starter pack now contains support to SAML applications [Register a SAML application in Azure AD B2C](https://learn.microsoft.com/en-us/azure/active-directory-b2c/saml-service-provider?tabs=macos&pivots=b2c-custom-policy), through a new technical profile. For details, see files [SignupOrSigninSAML](SocialAndLocalAccounts/SignupOrSigninSAML.xml) and [TrustFrameworkExtensions](SocialAndLocalAccounts/TrustFrameworkExtensions.xml). + +The starter pack now contains a AADSignUpOrSignin user journey. This journey supports the [Azure AD sign-in experience](https://learn.microsoft.com/en-us/azure/active-directory-b2c/identity-provider-azure-ad-single-tenant?pivots=b2c-custom-policy) . This journey will allow the user to sign up or sign in with an external Azure AD account. The user will be redirected to the Azure AD sign-in page to enter their credentials. The user will then be redirected back to the application to complete the sign-up or sign-in process. For details, see files [AADSignUpOrSigninSAML.xml](SocialAndLocalAccounts/AADSignUpOrSigninSAML.xml) and [TrustFrameworkExtensions](SocialAndLocalAccounts/TrustFrameworkExtensions.xml). + ### 09 August 2022 With this version the starter pack now contains a Refresh Token user journey. This journey will be executed any time an application [refreshes a token](https://docs.microsoft.com/azure/active-directory-b2c/access-tokens#request-a-token). It will check the user still exists and is enabled in the Azure AD B2C directory. It also checks that the refresh token is not expired. It compiles any claims that are not persisted in the user profile, including claims from Identity Provider's and REST API calls. A new set of refreshed tokens is then issued.