web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Cannot retrieve File c...
Power Pages
Suggested Answer

Cannot retrieve File column content using Webapi

(0) ShareShare
ReportReport
Posted on by 6
Hi,
 
I am trying to get the file content from the file type column in dataverse to my Power pages portal.
 
I have followed the documentation - 
1. Created Webapi site setting to enable it (Webapi/sm_candidate/enabled)
2. Created a site setting for fields (Webapi/sm_candidate/fields with value sm_name,sm_domicile)
3. Using the below code to fetch the data - 
 
webapi.safeAjax({
        type: "GET",
        url: "/_api/sm_candidates("+ id +")/sm_domicile",
        contentType: "application/json",
        success: function (data, textStatus, xhr) {
            var fileContent = data["value"]; // Base 64
            var fileName = "file.bin"; // default name
        },
        error: function (xhr, textStatus, errorThrown) {
            console.log(xhr);
        }
    });
 
But it is giving me error like - 
 
{
  "error": {
    "code": "90040101",
    "message": "Attribute * in table sm_candidate is not enabled for Web Api."
  }
}
 
 
When I cbange the value of Webapi/sm_candidate/fields site setting to '*'. It works.
Not sure what I am doing wrong here.
 
 
Categories:
  • Suggested answer
    SaiRT14 Profile Picture
    1,992 Super User 2025 Season 1 on at
     
    The issue stems from how the Web API site settings are configured in your Power Pages portal. The error message indicates that the attribute (sm_domicile) in your Dataverse table (sm_candidate) is not explicitly enabled for Web API access.
     
    The site setting Webapi/sm_candidate/fields defines which attributes (columns) in the sm_candidate table are accessible through the Web API. You must include sm_domicile in this setting. sm_name,sm_domicile
     
    let me know  if you need more details.
  • salesmaster Profile Picture
    6 on at
    @SaiRT14 I have it in my site setting already as you can see in point 2.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Mohsin Ali Profile Picture

Mohsin Ali 41

#2
sannavajjala87 Profile Picture

sannavajjala87 30 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 22 Super User 2026 Season 2

Last 30 days Overall leaderboard