Reputation: 5462
Visual Studio 2022 updated, all the latest workloads installed. I create Blazor Web App type of project with WebAssembly interactive render mode:
Now once the project got created, I try to add MS Identity Platform connected service, referencing Client project to my Azure Entra in "Connected Services". It fails with the error
It adds only Login and RedirectToLogin to a shared folder, none of the declared changes are done.
While I need WebAssembly type of authentication, I tried to connect to Entra from server project too, but it also failed.
Did anyone try and had a success? Just wanted to know if it's something wrong with my machine, or it's not supported yet.
Upvotes: 1
Views: 1234
Reputation: 111
It seems like the template is broken or at least squishy right now. Anyways, this article provides a working example
This cmd is the equivalent of the (broken?!) template you've used:
dotnet new blazorwasm -au SingleOrg --api-client-id "{SERVER API APP CLIENT ID}" --app-id-uri "{SERVER API APP ID URI GUID}" --client-id "{CLIENT APP CLIENT ID}" --default-scope "{DEFAULT SCOPE}" --domain "{TENANT DOMAIN}" -ho -o {PROJECT NAME} --tenant-id "{TENANT ID}"
You will receive a .net7 project with a working Blazor App with Entra login. I was able to update it to .net8 without any problems and login was still working.
Upvotes: 1