Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

*_merchant_managed_fulfillment_orders permissions disappear from app

*_merchant_managed_fulfillment_orders permissions disappear from app

EmiliaSC
Shopify Partner
6 1 2

I am adding these permissions through /admin/request_granular_access_scopes.json

write_merchant_managed_fulfillment_orders and read_merchant_managed_fulfillment_orders, then i confirm through /admin/oauth/access_scopes.json they were applied

 

i am able to see data about fulfillment_orders 

 

/admin/api/2023-04/orders/{order_id}/fulfillment_orders.json

 

{
    "fulfillment_orders": [
        {
            "id": 662xxxxxxx,
            "shop_id": 650xxxxxxx,
            "order_id": 560xxxxxxx,
        }
    ]
}

 

The expected behavior is that write_merchant_managed_fulfillment_orders and read_merchant_managed_fulfillment_orders should stay in the list of access scopes


Instead they are disappearing after a day or two and are being replaced with read_assigned_fulfillment_orders, but this permission does not allow me to read fulfillment orders

 

/admin/api/2023-04/orders/{order_id}/fulfillment_orders.json
{
"fulfillment_orders": []
}

I wrote to support@shopify.com and they are suggesting to turn to being a Fulfillment service apps, but this is not my requirement, i need to be an Order management app

 

Why are they disappearing?

Replies 2 (2)

Shayne
Shopify Staff (Retired)
254 20 48

Hi Emilia!

There may be some code in your app that's validating and updating your access scopes. Most of the libraries in the ecosystem will have some kind of logic that does this, so if you're manually updating the scopes outside of your app config, you're likely running into one of these "overwriting scopes" situation when the app reinitializes. It's hard to know based on the context that you're sharing here, but scopes are never changed without intervention of the app, so your app is updating the scopes somewhere.

Hope this helps, feel free to respond with more context!

Shayne | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

EmiliaSC
Shopify Partner
6 1 2

Great advice, there was an outdated permissions array in the controller that handles the App URL. I updated the array and i'll check later if the problem still persists.