Hello,
I use the custom authorization with a Static Web App, as describe in:
- https://docs.microsoft.com/en-us/azure/static-web-apps/authentication-custom?tabs=aad
- https://docs.microsoft.com/en-us/azure/static-web-apps/assign-roles-microsoft-graph
I use Node.js in the Azure function, but probably it is not the relevant.
It works well as long as there is no accent/special char in the name of a user in the AD.
As soon as one accent is present in the user name, the custom authentication Azure function does not work anymore, resulting is an HTTP 403 error.
The root cause is a not conform user = req.body structure, which does not allow to get the token (user.accessToken throw an exception)
I found a workaround by stringify the user var, correct the format (double quote removal, adding missing char at the end), to get again a valid json, and getting again the access token to go on with the normal process.
This workaround works only with:
- Azure Active Directory Version 2 (otherwise the access token signature is not valid)
- With no more than 3 accents in the user name (after the token is not complete anymore)
Is there a "clean solution" (specifying the encoding type somewhere?) or any plan to correct this bug?
It is really a blocking issue for all countries using accent/special char in the AD....
Best regards
Blaise