Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Suggested answer

Getting error while calling RetrieveEnvironmentVariableSecretValue web api method

Posted on by 5

Hello everyone,

I am getting strange error "Access Denied" while calling RetrieveEnvironmentVariableSecretValue request from Javascript and C# backend code. Same unbound action works fine from Power Automate flow. This same API call was working couple of days back so not sure what may be the issue here.

Does anyone face the same issue in past ?

Thanks,

Mahesh Ghori

  • Suggested answer
    Eddy1313 Profile Picture
    Eddy1313 on at
    Getting error while calling RetrieveEnvironmentVariableSecretValue web api method
     
    Retrieves an environment variable secret value. This API is limited to being called within a Power Automate Flow and cannot be called directly in your code
  • alubbe7 Profile Picture
    alubbe7 10 on at
    RE: Getting error while calling RetrieveEnvironmentVariableSecretValue web api method

    They changed the functionality without warning or informing users. They updated the docs to state that any calls from code to RetrieveEnvironmentVariableSecretValue is not possible.

  • DGA205 Profile Picture
    DGA205 45 on at
    RE: Getting error while calling RetrieveEnvironmentVariableSecretValue web api method

    Thanks you Mehdi.

    Until today it was working from plugins.

    It limitation has changed recently?

  • Suggested answer
    meelamri Profile Picture
    meelamri 13,198 User Group Leader on at
    RE: Getting error while calling RetrieveEnvironmentVariableSecretValue web api method

    Hi, 

    Based on current docs. This API is limited to being called within a Power Automate Flow and cannot be called directly in your code. Please refer to the following docs.

  • DGA205 Profile Picture
    DGA205 45 on at
    RE: Getting error while calling RetrieveEnvironmentVariableSecretValue web api method

    We have the same problem, suddenly stoped to work.

  • alubbe7 Profile Picture
    alubbe7 10 on at
    RE: Getting error while calling RetrieveEnvironmentVariableSecretValue web api method

    Hi,

    We have the exact same problem. We are calling RetrieveEnvironmentVariableSecretValue from within a React PCF app as well as a C# Plug-In, both suddenly resulting in 403: Access Denied.

    Our config has not changed. What could the problem be?

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,960 Super User on at
    RE: Getting error while calling RetrieveEnvironmentVariableSecretValue web api method

    Hi,

    Would you please check the Security role assigned to the user under which Api/backend code is getting executed ?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,420 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,672 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans