microsoft / StoreBroker

A PowerShell module that leverages the Windows Store Submission API to allow easy automation of application submissions to the Windows Store. The master branch is stable and the v2 branch is under active development.
Other
98 stars 40 forks source link

Can't get past (500) Internal Server Error #271

Closed bitbltr closed 1 week ago

bitbltr commented 2 weeks ago

Been stuck for 2 days on this. All operations fail with the following. It appears to be failing in Get-AccessToken. I have rechecked all my setup. Deleted users and keys and started over multiple times. My Entra tenant is on Azure. My Partner Center user is created as "Manager". What am I missing? I don't see a correlation ID.

DONE (FAILED) - Operation took 1 second(s) [Getting access token]
Write-Log : 2024-10-04 13:35:21 : RonPeters : Be sure to check that your client id/secret are valid.
The remote server returned an error: (500) Internal Server Error.
 :
At C:\Program Files\WindowsPowerShell\Modules\StoreBroker\1.21.2\StoreBroker\StoreIngestionApi.psm1:556 char:9
+         Write-Log -Message $newLineOutput -Level Error
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Log

Be sure to check that your client id/secret are valid.
The remote server returned an error: (500) Internal Server Error.
 :
At C:\Program Files\WindowsPowerShell\Modules\StoreBroker\1.21.2\StoreBroker\StoreIngestionApi.psm1:557 char:9
+         throw $newLineOutput
+         ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Be sure to chec...ver Error.
 : :String) [], RuntimeException
    + FullyQualifiedErrorId : Be sure to check that your client id/secret are valid.
The remote server returned an error: (500) Internal Server Error.
bitbltr commented 2 weeks ago

Instead of adding an existing Entra application, I now created a new one in Partner Center. Now I get a 401 Unauthorized


DONE (FAILED) - Operation took 1 second(s) [Getting access token]
Write-Log : 2024-10-04 14:28:13 : RonPeters : Be sure to check that your client id/secret are valid.
The remote server returned an error: (401) Unauthorized.
 :
At C:\Program Files\WindowsPowerShell\Modules\StoreBroker\1.21.2\StoreBroker\StoreIngestionApi.psm1:556 char:9
+         Write-Log -Message $newLineOutput -Level Error
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Log

Be sure to check that your client id/secret are valid.
The remote server returned an error: (401) Unauthorized.
 :
At C:\Program Files\WindowsPowerShell\Modules\StoreBroker\1.21.2\StoreBroker\StoreIngestionApi.psm1:557 char:9
+         throw $newLineOutput
+         ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Be sure to chec...uthorized.
 : :String) [], RuntimeException
    + FullyQualifiedErrorId : Be sure to check that your client id/secret are valid.
The remote server returned an error: (401) Unauthorized.
 :```
bitbltr commented 2 weeks ago

I'm not sure what exactly I did to make it work, but now it works. I think the process is create an Entra application from the Partner center. Then go to Azure, find the application and then remove the Web application redirect URIs. I wish I had kept better track of what I did so I could help others.

HowardWolosky commented 1 week ago

I'm not sure what exactly I did to make it work, but now it works. I think the process is create an Entra application from the Partner center. Then go to Azure, find the application and then remove the Web application redirect URIs. I wish I had kept better track of what I did so I could help others.

If you do end up recalling what you did, we'd be happy to either directly take a documentation update PR or the relevant info in order for us to make the documentation update.