-
Notifications
You must be signed in to change notification settings - Fork 239
Description
API experience
Add support for CIAM CUD authorities. See https://microsoft-my.sharepoint-df.com/:w:/p/jmprieur/EbtMcuWkuyRKnWTR8Fg9EAsBMn22Sy5Kni6YWOxTfYWjtg?e=GGad0r for spec
"AzureAd": {
"ClientId": "12345-cdd4-46d4-9e68-db03240b4baa",
"Authority": "https://cats.ciamextensibility.com/111111-43bb-4ff9-89af-30ed8fe31c6d/v2.0"
},
Technical details
In MergedOptions:
- Add a new boolean property named
PreserveAuthority - in
MergedOptions.ParseAuthorityIfNecessary, only set themergedOptions.TenantIdifmergedOptions.PreserveAuthorityis false (as MSAL.NET does not want a tenantId when.WithOidcAuthorityis used)
In AuthorityHelper.BuildCiamAuthorityIfNeeded, have a new out bool parameter preserveAuthority, which will be set to false if the authority is a CiamLogin.com authority and otherwise to true
In MicrosoftIdentityWebApiAuthenticationBuilderExtensions.cs and WebAppExtensions\MicrosoftIdentityWebAppAuthenticationBuilderExtensions.cs, after calling AuthorityHelper.BuildCiamAuthorityIfNeeded, set mergedOptions.PreserveAuthority based on the value of the out parameter.
In TokenAcquisition.BuildConfidentialClientApplicationAsync()
- if
mergedOptions.PreserveAuthorityis true, set the authority tomergedOptions.Authorityand callbuilder.WithOidcAuthority(authority),
otherwise do as today (WithAuthority, and WithB2CAuthority)
Need to MSAL 4.60.0-preview to get builder.WithOidcAuthority(authority)
Testing resources
MSAL 4.60.0-preview and a CIAM CUD test tenant can be found at https://microsofteur-my.sharepoint.com/:f:/g/personal/bogavril_microsoft_com/EoEwmcgN3oJAplznhkE-OosBAQc4xl7I2sNVC8TfDFR_JA?e=8M82R9
CIAM CUD is not currently available in the Lab.