You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this API - List driveProtectionUnits, following endpoint is supported and works as expected. Purpose of this endpoint is to return all the protection units of type driveProtectionUnit. Here driveProtectionUnit inherits the protectionUnits type.
GET /solutions/backupRestore/protectionUnits/microsoft.graph.driveProtectionUnit
For this endpoint, equivalent PowerShell command is mentioned below which does not represent the equivalent HTTP endpoint.
Expected PowerShell command is which takes the type similar to "microsoft.graph.driveProtectionUnit" instead of "ProtectionUnitBaseId" which represents the id of the single unit.
Body:
{
"error": {
"code": "Unknown",
"message": "We are unable to process your request right now due to an internal error Please contact raise an
incident ticket if problem is not resolved",
"innerError": {
"date": "2024-12-03T17:34:15",
"request-id": "d397dc57-dab0-4453-b0e1-c1d7dd05f20b",
"client-request-id": "568ad042-bfdb-4a9d-8fd4-5d16925af3aa"
}
}
}
Confirm
We are unable to process your request right now due to an internal error Please contact raise an incident ticket if
problem is not resolved
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A
Get-MgSolutionBackupRestoreProtectionUnit : We are unable to process your request right now due to an internal
error Please contact raise an incident ticket if problem is not resolved
Status: 500 (InternalServerError)
ErrorCode: Unknown
Date: 2024-12-03T17:34:15
Headers:
Transfer-Encoding : chunked
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : d397dc57-dab0-4453-b0e1-c1d7dd05f20b
client-request-id : 568ad042-bfdb-4a9d-8fd4-5d16925af3aa
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Central
India","Slice":"E","Ring":"3","ScaleUnit":"002","RoleInstance":"PN2PEPF00000278"}}
Date : Tue, 03 Dec 2024 17:34:15 GMT
At line:1 char:1
Hi @Anand-Malli thank you for logging this issue. It seems there are two issues here.
Metadata issue.
The paths /solutions/backupRestore/protectionUnits/microsoft.graph.driveProtectionUnit and /solutions/backupRestore/protectionUnits/microsoft.graph.siteProtectionUnit do not exist among the list of paths provided in the metadata here. Please note that cmdlet generation depends on metadata/open Api information provided by the workload/service owners and in this case, it seems like invalid endpoints were provided. For such an issue it needs to be escalated here https://developer.microsoft.com/en-us/graph/support so that the API owner can respond to it.
Documentation issue.
Wrong snippets have been provided for the equivalent http paths. The PowerShell example tabs should be blank. Related issue for that is here Wrong PowerShell Snippet microsoft-graph-devx-api#2265.
Hey @timayabi2020, we are the service owner in this case. I have 2 follow up questions:
Can you point out where can I find the yaml for the metadata being populated from?
The endpoint provided is working as expected in graph, only the automatically generated cmdlts are incorrect. And for mailbox the path /solutions/backupRestore/exchangeProtectionPolicies/{exchangeProtectionPolicyId}/mailboxProtectionUnits/ , I don't see any cmdlet generated.
Describe the bug
On this documentation page - https://learn.microsoft.com/en-us/graph/api/backuprestoreroot-list-driveprotectionunits?view=graph-rest-1.0&tabs=http
For this API - List driveProtectionUnits, following endpoint is supported and works as expected. Purpose of this endpoint is to return all the protection units of type driveProtectionUnit. Here driveProtectionUnit inherits the protectionUnits type.
GET /solutions/backupRestore/protectionUnits/microsoft.graph.driveProtectionUnit
For this endpoint, equivalent PowerShell command is mentioned below which does not represent the equivalent HTTP endpoint.
Import-Module Microsoft.Graph.BackupRestore
Get-MgSolutionBackupRestoreProtectionUnit -ProtectionUnitBaseId $protectionUnitBaseId
Here it takes the "ProtectionUnitBaseId" which represents the identifier of the single unit which is not matching with the http endpoint.
This issue is present for 3 similar endpoints.
https://learn.microsoft.com/en-us/graph/api/backuprestoreroot-list-driveprotectionunits?view=graph-rest-1.0&tabs=http
https://learn.microsoft.com/en-us/graph/api/backuprestoreroot-list-siteprotectionunits?view=graph-rest-1.0&tabs=http
https://learn.microsoft.com/en-us/graph/api/backuprestoreroot-list-siteprotectionunits?view=graph-rest-1.0&tabs=http
Expected behavior
Expected PowerShell command is which takes the type similar to "microsoft.graph.driveProtectionUnit" instead of "ProtectionUnitBaseId" which represents the id of the single unit.
Attached the debug output, it's translating to Uri "https://graph.microsoft.com/v1.0/solutions/backupRestore/protectionUnits" instead this should be translating to Uri "https://graph.microsoft.com/v1.0/solutions/backupRestore/protectionUnits/microsoft.graph.driveProtectionUnit"
How to reproduce
Execute 'Get-MgSolutionBackupRestoreProtectionUnit'
SDK Version
2.25.0
Latest version known to work for scenario above?
No response
Known Workarounds
No workaround
Debug output
Click to expand log
```DEBUG: [Authentication]: - Scopes: [BackupRestore-Configuration.ReadWrite.All, BackupRestore-Control.ReadWrite.All,
BackupRestore-Restore.ReadWrite.All, BackupRestore-Search.Read.All, openid, profile, email].
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://graph.microsoft.com/v1.0/solutions/backupRestore/protectionUnits
Headers:
FeatureFlag : 00000043
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.26100;
en-US),PowerShell/5.1.26100.2161
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
InternalServerError
Headers:
Transfer-Encoding : chunked
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : d397dc57-dab0-4453-b0e1-c1d7dd05f20b
client-request-id : 568ad042-bfdb-4a9d-8fd4-5d16925af3aa
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Central
India","Slice":"E","Ring":"3","ScaleUnit":"002","RoleInstance":"PN2PEPF00000278"}}
Date : Tue, 03 Dec 2024 17:34:15 GMT
Body:
{
"error": {
"code": "Unknown",
"message": "We are unable to process your request right now due to an internal error Please contact raise an
incident ticket if problem is not resolved",
"innerError": {
"date": "2024-12-03T17:34:15",
"request-id": "d397dc57-dab0-4453-b0e1-c1d7dd05f20b",
"client-request-id": "568ad042-bfdb-4a9d-8fd4-5d16925af3aa"
}
}
}
Confirm
We are unable to process your request right now due to an internal error Please contact raise an incident ticket if
problem is not resolved
Status: 500 (InternalServerError)
ErrorCode: Unknown
Date: 2024-12-03T17:34:15
Headers:
Transfer-Encoding : chunked
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : d397dc57-dab0-4453-b0e1-c1d7dd05f20b
client-request-id : 568ad042-bfdb-4a9d-8fd4-5d16925af3aa
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Central
India","Slice":"E","Ring":"3","ScaleUnit":"002","RoleInstance":"PN2PEPF00000278"}}
Date : Tue, 03 Dec 2024 17:34:15 GMT
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A
Get-MgSolutionBackupRestoreProtectionUnit : We are unable to process your request right now due to an internal
error Please contact raise an incident ticket if problem is not resolved
Status: 500 (InternalServerError)
ErrorCode: Unknown
Date: 2024-12-03T17:34:15
Headers:
Transfer-Encoding : chunked
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : d397dc57-dab0-4453-b0e1-c1d7dd05f20b
client-request-id : 568ad042-bfdb-4a9d-8fd4-5d16925af3aa
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Central
India","Slice":"E","Ring":"3","ScaleUnit":"002","RoleInstance":"PN2PEPF00000278"}}
Date : Tue, 03 Dec 2024 17:34:15 GMT
At line:1 char:1
DEBUG: [CmdletEndProcessing]: - Get-MgSolutionBackupRestoreProtectionUnit end processing.
The text was updated successfully, but these errors were encountered: