microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Set-MgApplicationVerifiedPublisher Status: 403 (Forbidden) ErrorCode: UnknownError
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 898
- Forks
- 230
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 31
Description
Describe the bug
I am trying to set Application VerfiedPublisherId with powershell and MsGraph.
I can set VerifiedPublishelId with request via GraphExplorer but can not do the same via PowerShell script.
I definitely have all the permissions.
Expected behavior
204
Command executed and verified publisher is set.
How to reproduce
$body = @{
VerifiedPublisherId = $desiredState.VerifiedPublisher.VerifiedPublisherId
}
Set-MgApplicationVerifiedPublisher -ApplicationId $application.Id -BodyParameter $body;
SDK Version
2.19.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
POST
Absolute Uri:
https://graph.microsoft.com/v1.0/applications/45385439-4846-49bf-911b-d2540b79bd43/microsoft.graph.setVerifiedPublisher
Headers:
FeatureFlag : 00000043
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.22631; en-GB),PowerShell/2024.2.2
Accept-Encoding : gzip
SdkVersion : graph-powershell/2.19.0
client-request-id : acdb195d-1ee9-43ae-812c-d48f8fa165bc
Body:
{
"verifiedPublisherId": "6838492"
}
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
Forbidden
Headers:
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : dd6961b8-3ddc-4af1-b593-f622d8e4d0a3
client-request-id : acdb195d-1ee9-43ae-812c-d48f8fa165bc
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Sweden Central","Slice":"E","Ring":"3","ScaleUnit":"001","RoleInstance":"GV2PEPF00000EA7"}}
Date : Thu, 30 May 2024 07:56:34 GMT
Body:
{
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"date": "2024-05-30T07:56:34",
"request-id": "dd6961b8-3ddc-4af1-b593-f622d8e4d0a3",
"client-request-id": "acdb195d-1ee9-43ae-812c-d48f8fa165bc"
}
}
}
</details>
### Configuration
Windows 11 x64
### Other information
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Set-MgApplicationVerifiedPublisher command with SDK version 2.19.0 and compare its request with the successful Graph Explorer request. Investigate the PowerShell SDK command and the Microsoft Graph endpoint shown in the debug output; done means the command succeeds and returns 204 while setting the verified publisher.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100