I am currently learning about Power BI embed application, and I just recently created a service principle that is able to embed Power BI reports to my test front end.
Right now I am storing all the information, including application ID and client secret in the app.config file, and I am accessing them in my code by using ConfigurationManager.Appsettings["(key)"].
As I read online that I should not put them in plain sight or have them hardcoded, I was wondering where could I store the application ID and the client secret, and how can I access them from my code.
I have tried storing them in the database that my service principle is connected to, which also stores all the workspace Ids and report Ids, but it is not really efficient.
I am currently using .Net 6 for my service principal for the backend and Vue for the frontend.
You can use Azure Key Vault, follow this link https://devblogs.microsoft.com/dotnet/storing-and-using-secrets-in-azure/ you can learn more about azure key vaults here