-
Notifications
You must be signed in to change notification settings - Fork 126
Description
Steps to reproduce
Use appOnly context by using the PartnerCenter WebApp application registration
Backup Application Registration manifest.json from Azure Portal because that's the easiest way to return removed permissions
Replace Azure Active Directory Graph (as its deprecated long time ago) permissions for the application registration in Azure Portal with the equivalent Microsoft Graph permissions
(to be specific it is about Directory.Read.All)
After obtaining appOnly context in your c# code - call
Customer customer = await aggregatePartner.Customers.ById(tenantId).GetAsync();Expected behavior
The SDK should return the details about the customer and fill the variable with the correct model data
Actual behavior
The PartnerException from sdk is invoked due to 403 response from the server. I assume that SDK is accessing some old endpoint/action because the same permissions are enough (Microsoft Graph - Directory.Read.All) if we are using REST api call equivalent with postman.
Diagnostic logs
Microsoft.Store.PartnerCenter.Exceptions.PartnerException
HResult=0x80131500
Message=The server returned error code '403' (Forbidden).
Source=Microsoft.Store.PartnerCenter
StackTrace:
at Microsoft.Store.PartnerCenter.Network.PartnerServiceProxy'2.d__70.MoveNext()
at Microsoft.Store.PartnerCenter.Network.PartnerServiceProxy'2.d__68.MoveNext()
at Microsoft.Store.PartnerCenter.Network.PartnerServiceProxy'2.d__58.MoveNext()
at Microsoft.Store.PartnerCenter.Customers.CustomerOperations.d__86.MoveNext()
at ....
Environment
.NET 6
Both Azure Functions and Windows11 - local development
All v3 versions of nuget, even the latest (3.4.0 at the moment)