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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Altpgen Error while generating CRM table for integration.

(4) ShareShare
ReportReport
Posted on by 184
 ALL the things are working fine , I have also registered int he Azure Portal Microsoft Intra ID but i am facing the below issue after the authentication .

error CDS0002: Unable to retrieve metadata for 'attribute'. Reason: The HTTP request was forbidden with client authentication scheme 'Anonymous'..

Pls help me solve this issue and why this is occuring.
 
I have the same question (0)
  • Suggested answer
    KodeKounter Profile Picture
    8 on at
    Hello Reader,
     
    There is one specific user is getting created while we integrate Business central with Microsoft Dynamics 365 Sales or CRM. that application user might have named as Business Central Integration in the CRM side and you have to check which role is assigned to that user on CRM. because of the access right of that assigned role you're facing this error. you can assign Business Central Dataverse Integration Role to your application user which is created automatically.
     
    If this same role is assigned to the application user and you're trying to fetch proxy table of custom entity than you should give access of your custom entity to the Business Central Dataverse Integration role. 
     
    I hope this solution will resolve the issue.
     
    Please verify this answer if it work for you to help others finding their solution.
     
    Thanks.
    Krina Kanani
  • Suggested answer
    Ramesh Kumar Profile Picture
    7,529 Super User 2025 Season 2 on at

    The error message indicates that the request is being made with an Anonymous authentication scheme. Ensure that the authentication is properly configured to use OAuth or Azure Active Directory for your connection to Dynamics 365 and Business Central and Double-check the authentication settings in your connection configuration. Make sure you are using the correct Client ID and Client Secret or Certificate for OAuth authentication.

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/authenticate-web-services-using-oauth

    https://learn.microsoft.com/en-us/answers/questions/849752/error-the-http-request-was-forbidden-with-client-a

    Thanks, Ramesh

    If this was helpful, please check the "Does this answer your question?" box and mark it as verified.

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at
    It doesn't look like you are using the right authentication.
     
    Check this blog post for reference on using altpgen.
     
  • Verified answer
    YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 on at
    Hi, hope the following helps.
    Business Central 2024 wave 1 (BC24): Changes to AL Table Proxy Generator tool (altpgen) – Two additional arguments: ClientId and RedirectUri
     
    Thanks.
    ZHU
  • Aryan Profile Picture
    184 on at
    I have tried each and every thing but unable to understand this i have done what u guys have said but its still showing that same error 
    pls help me solve this issue as its very urgent , 

    if want pls provide me time and contact info i can even connect?
     
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    20,603 Super User 2025 Season 2 on at
  • Vahid Ghafarpour Profile Picture
    12,168 Super User 2025 Season 2 on at

    If any of the responses helped resolve your issue, please take a moment to mark the best answer. This helps others in the community quickly find solutions to similar problems.

    To do this, simply click the "Does this answer your question?" button on the most helpful response and like the helpful posts. If your issue is still unresolved, feel free to provide more details so the community can assist further!

    Thanks for being an active part of the Dynamics 365 Community! 😊

     

  • Gerardo Rentería García Profile Picture
    25,236 Most Valuable Professional on at
  • Suggested answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at
  • Verified answer
    YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 on at
    It's not clear where your problem lies. The final command is as follows. I hope it can give you some hints.
    .\altpgen -project:"C:\Users\yzhu\Documents\AL\BC25P" -packagecachepath:"C:\Users\yzhu\Documents\AL\BC25P\.alpackages" -serviceuri:"https://orge9084970.crm.dynamics.com" -entities:cra00_labbook -baseid:50100 -tabletype:CDS -clientid:61b08a00-14bb-40e7-bac8-def3bc9349a4 -redirecturi:"http://localhost"

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans