Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

inventory recalculation invalid_scope error

(0) ShareShare
ReportReport
Posted on by 4

Hi

I wrote a job for recalculate inventsum and fix onhand qty errors.

I call standard recalculation functionality.

InventSumReCalcItem reCalcItem = new InventSumReCalcItem(itemId, true, CheckFix::fix);

 reCalcItem.updateNow();


At the end of job system create an error and on hand does not fix.

Do you have any solution about error?

error: 

Unable to retrieve token. Error: invalid_scope. Error description: Principal is not authorized for requested scopes. { "Principal": "finops-aos:7fba2e58-8d81-4144-98b0-xxxxxxxxxaef", "Context": "finops-env:7fba2e58-8d81-4144-98b0-xxxxxxxxxaef", "RequestedScopes": [ "https://inventoryservice.operations365.dynamics.com/.default" ], "UnauthorizedScopes": [ "https://inventoryservice.operations365.dynamics.com/.default" ] }. Error URI: . Correlation id: 12911cdc-9afc-4523-b28a-xxx2d5xxx4f0e

Ekran-g_F600_r_FC00_nt_FC00_s_FC00_-2023_2D00_04_2D00_03-170528.png

  • davut Profile Picture
    4 on at
    RE: inventory recalculation invalid_scope error

    Hello Andre

    in the feature management inventory visibility features are enabled and add in is not configured.

    I disabled features and problem is solved. thanks for reply.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    295,447 Super User 2025 Season 1 on at
    RE: inventory recalculation invalid_scope error

    Hi Davut,

    It looks like you also configured the Inventory Visibility add-in. If you don't have customizations, I would suggest logging an incident for Microsoft Support. There might be a regression due to the Inventory Visibility solution.

  • davut Profile Picture
    4 on at
    RE: inventory recalculation invalid_scope error

    Hi Andre

    Thanks for reply.

    I tried standard functionality to.

    I get same error.

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    295,447 Super User 2025 Season 1 on at
    RE: inventory recalculation invalid_scope error

    Hi Davut,

    There is no need to create a separate class to run the consistency check. You can follow the instructions in the blog from Tim Schofield to run this from the user interface with the standard feature.

    Consistency check for a single item in Dynamics 365 for Operations (and AX 2012 and AX 2009). - Dynamics 365 Finance Community

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Zain Mehmood Profile Picture

Zain Mehmood 462 Moderator

#2
Danny Bilodeau Profile Picture

Danny Bilodeau 156 Moderator

#3
Laurens vd Tang Profile Picture

Laurens vd Tang 120 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans