Accessing Azure Application Settings With Javascript
Solution 1:
NEWEST
This api need add bear token to request.
According to your description, your project is only html
+js
, which is originally a static resource, hard coding will definitely cause security issues. But you will be much safer using rest api
now.
Because you first need to obtain the bear token, you need to refer to the official documentation for details.
Microsoft identity platform and OAuth 2.0 authorization code flow
If you want to make minimal changes to the project, you may need to use ROPC flow. You can refer my another in another post.
PRIVIOUS
You can use rest api to get application settings.
The JavaScript script in Html does not support node usage. The syntax of process.env.CLIENT_ID
is suitable for use in complete nodejs projects. It is recommended to use restapi to get the value of the application settings you want.
My custom settings in portal.
You can access this site. Web Apps - List Application Settings.
Post a Comment for "Accessing Azure Application Settings With Javascript"