Easy access to secure Environment Variables #263
Replies: 8 comments
-
|
@chumleesockson Hi, have you success in loading the full images with Web API? Could you please share your solution? |
Beta Was this translation helpful? Give feedback.
-
|
@ASIEngineering @chumleesockson I cannot get this to work. I keep running into CSP error. |
Beta Was this translation helpful? Give feedback.
-
It sounds like you need to allow access to the URL: https://learn.microsoft.com/en-us/power-apps/developer/code-apps/how-to/content-security-policy |
Beta Was this translation helpful? Give feedback.
-
The solution is nothing special. You just need to call the right URL. It's unrelated to Code Apps; it's just a Dataverse Web API thing. This is what my URL looks like:
|
Beta Was this translation helpful? Give feedback.
-
|
@chumleesockson I was able to get it to work locally but when published it doesn't work. |
Beta Was this translation helpful? Give feedback.
-
|
I updated the CSP setting as per the guide from @chumleesockson, and it works fine now. https://learn.microsoft.com/en-us/power-apps/developer/code-apps/how-to/content-security-policy |
Beta Was this translation helpful? Give feedback.
-
|
I think my problem is that I’m impatient. After about 30 minutes the CSP policy updated. |
Beta Was this translation helpful? Give feedback.
-
|
Oh really, my policy is updated almost immediately. Good to know! |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm loving Code Apps. They're awesome.
How are we expected to utilise environment variables? We can't use a dot env file, and if we use the environment variables in Dataverse then we need to query them from Dataverse and also give the logged in user read access to them, which is obviously not ideal.
This issue arose for me when looking into displaying full images from Dataverse, which might be a separate issue. In order to display full images from Dataverse, my understanding is that you need to use the Dataverse Web API, but that org URL will of course change when the app is deployed, so it needs an environment variable.
https://learn.microsoft.com/en-us/power-apps/developer/data-platform/image-column-data?tabs=webapi#url-to-download-full-sized-image
Beta Was this translation helpful? Give feedback.
All reactions