microsoftgraph / microsoftgraph/msgraph-sdk-powershell
adding multi-geo sharepoint site resource to catalog using v1.0 Power Shell commands.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 898
- Forks
- 230
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 31
Description
Describe the bug
Hello,
we are using the PowerShell SDK to provision catalog in entitlement management and add a SharePoint Online site as a resource. We found there are a few articles that the entitlement management supports Multi-Geo. Here is the article from Microsoft: Multi-geo add resource to catalog.
When I am using the command New-MgEntitlementManagementResourceRequest and use url parameter as japan region provisioned site, it just fails to add.
$params = @{
requestType = "adminAdd"
resource = @{
displayName = $requestObj.requestTitle
description = $requestObj.requestTitle
originId ="https://companyjpn.sharepoint.com/teams/testjapan"
originSystem = "SharePointOnline"
}
catalog = @{
id = $catalogObj.Id
}
}
New-MgEntitlementManagementResourceRequest -BodyParameter $params | Out-Null -ErrorAction Stop
ERROR:
[RequestFailedInOriginSystem] : "Attempted to perform an unauthorized operation.","details"
New-MgEntitlementManagementResourceRequest_Create: Line | 910 | New-MgEntitlementManagementResourceRequest -BodyParameter $pa … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | "Attempted to perform an unauthorized operation.","details" Status: 400 (BadRequest) ErrorCode: RequestFailedInOriginSystem Date: 2024-12-26T11:58:25
Anyone please help in adding multi-geo site as a resource in the catalog? Thanks
Expected behavior
HTTP/1.1 201 Created
Content-type: application/json
{
"id": "acc2294e-f37f-42d3-981d-4e83847ed0ce",
"requestType": "adminAdd",
"state": "delivered"
}
How to reproduce
$params = @{
requestType = "adminAdd"
resource = @{
originId = "https://microsoft.sharepoint.com/sites/Example"
originSystem = "SharePointOnline"
}
catalog = @{
id = "beedadfe-01d5-4025-910b-84abb9369997"
}
}
New-MgEntitlementManagementResourceRequest -BodyParameter $params
SDK Version
No response
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### 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 with the Microsoft multi-geo SharePoint resource article and the New-MgEntitlementManagementResourceRequest reproduction, comparing the Japan-region originId with the example site. Reproduce the RequestFailedInOriginSystem 400 response and determine whether the request can return the expected 201 Created state of delivered; the issue provides no SDK version or debug output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100