Listar unidadeProtectionUnits
Namespace: microsoft.graph
Importante
As APIs na versão /beta
no Microsoft Graph estão sujeitas a alterações. Não há suporte para o uso dessas APIs em aplicativos de produção. Para determinar se uma API está disponível na v1.0, use o seletor Versão.
Obtenha uma lista dos objetos driveProtectionUnit associados a um oneDriveForBusinessProtectionPolicy.
Esta API está disponível nas seguintes implementações de cloud nacionais.
Serviço global | US Government L4 | US Government L5 (DOD) | China operada pela 21Vianet |
---|---|---|---|
✅ | ❌ | ❌ | ❌ |
Permissões
Escolha a permissão ou permissões marcadas como menos privilegiadas para esta API. Utilize uma permissão ou permissões com privilégios mais elevados apenas se a sua aplicação o exigir. Para obter detalhes sobre as permissões delegadas e de aplicação, veja Tipos de permissão. Para saber mais sobre estas permissões, veja a referência de permissões.
Tipo de permissão | Permissões com menos privilégios | Permissões com privilégios superiores |
---|---|---|
Delegado (conta corporativa ou de estudante) | BackupRestore-Configuration.Read.All | Indisponível. |
Delegado (conta pessoal da Microsoft) | Sem suporte. | Sem suporte. |
Application | BackupRestore-Configuration.Read.All | Indisponível. |
Solicitação HTTP
GET /solutions/backupRestore/protectionUnits/microsoft.graph.driveProtectionUnit
GET /solutions/backupRestore/oneDriveForBusinessProtectionPolicies/{oneDriveForBusinessProtectionPolicyId}/driveProtectionUnits
Cabeçalhos de solicitação
Nome | Descrição |
---|---|
Autorização | {token} de portador. Obrigatório. Saiba mais sobre autenticação e autorização. |
Corpo da solicitação
Não forneça um corpo de solicitação para esse método.
Resposta
Se for bem-sucedido, este método devolve um 200 OK
código de resposta e uma coleção de driveProtectionUnit no corpo da resposta.
Para obter uma lista de possíveis respostas a erros, veja Respostas de erros da API de Armazenamento de Cópias de Segurança.
Exemplos
Exemplo 1: listar todas as unidadesProtectionUnits num inquilino
O exemplo seguinte mostra como obter uma lista de todos os objetos driveProtectionUnits num inquilino.
Solicitação
O exemplo a seguir mostra uma solicitação.
GET /solutions/backupRestore/protectionUnits/microsoft.graph.driveProtectionUnit
Resposta
O exemplo a seguir mostra a resposta.
HTTP/1.1 200 OK
{
"@odata.nextLink": "https://graph.microsoft.com/beta/solutions/backupRestore/protectionUnits/microsoft.graph.driveProtectionUnit?$skiptoken=M2UyZDAwMDAwMDMxMzkzYTMyNjQ2MTM0NjMzMjM5NjYzNjY0MzczMDM0MzE2NTYzNjEzNzMwNjIzNjMzMzg2MjM0MzM2NDM0MzUzNDMzMzc0MDc0Njg3MjY1NjE2NDJlNzYzMjAxZThmYjY4M2Y3ODAxMDAwMDg4NjA5ODdhNzgwMTAwMDB8MTYxNjk2NDUwOTgzMg%3d%3d",
"value": [
{
"@odata.type": "#microsoft.graph.driveProtectionUnit",
"id": "2b014d8c-71fe-4d00-a01a-31850bc5b32c",
"directoryObjectId": "384974e2-72cd-48de-a6e8-6985d7c5db90",
"displayName": "Jefferson Lee", // Newly Added
"email": "lee@contoso.com", // Newly Added
"status": "unprotected",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.driveProtectionUnit",
"id": "8f014d8c-71fe-4d00-a01a-31850bc5b32c",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"directoryObjectId": "781d9337-d8f0-456e-92cd-00a3abdd2093",
"displayName": "Mastura Ibrahim", // Newly Added
"email": "ibrahim@contoso.com", // Newly Added
"status": "protectRequested",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.driveProtectionUnit",
"id": "9b014d8c-71fe-4d00-a01a-31850bc5b32c",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"directoryObjectId": "2d1d9337-d8f0-456e-92cd-00a3abdd2093",
"displayName": "Esmira Musayeva", // Newly Added
"email": "esmira@contoso.com", // Newly Added
"status": "unprotected",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.driveProtectionUnit",
"id": "9b014d8c-71fe-4d00-a01a-31850bc5b32c",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"directoryObjectId": "2e1d9337-d8f0-456e-92cd-00a3abdd2093",
"displayName": "Ahmad Hakiki", // Newly Added
"email": "ahmad@contoso.com", // Newly Added
"status": "protected",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.driveProtectionUnit",
"id": "9b014d8c-71fe-4d00-a01a-31850bc5b32c",
"directoryObjectId": "2w1d9337-d8f0-456e-92cd-00a3abdd2093",
"displayName": "Rashmi Mishra ", // Newly Added
"email": "eddyb@contoso.com", // Newly Added
"status": "unprotected",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
}
]
}
Exemplo 2: listar a unidadeProtectionUnits associadas a uma política de proteção do OneDrive para trabalho ou escola
O exemplo seguinte mostra como listar todas as unidadesProtectionUnits associadas a um oneDriveForBusinessProtectionPolicy.
Solicitação
O exemplo a seguir mostra uma solicitação.
GET /solutions/backupRestore/oneDriveForBusinessProtectionPolicies/845457dc-4bb2-4815-bef3-8628ebd1952e/driveProtectionUnits
Resposta
O exemplo a seguir mostra a resposta.
HTTP/1.1 200 OK
{
"@odata.nextLink": "https://graph.microsoft.com/beta/solutions/backupRestore/oneDriveForBusinessProtectionPolicies/845457dc-4bb2-4815-bef3-8628ebd1952e/driveProtectionUnits?$skiptoken=M2UyZDAwMDAwMDMxMzkzYTMyNjQ2MTM0NjMzMjM5NjYzNjY0MzczMDM0MzE2NTYzNjEzNzMwNjIzNjMzMzg2MjM0MzM2NDM0MzUzNDMzMzc0MDc0Njg3MjY1NjE2NDJlNzYzMjAxZThmYjY4M2Y3ODAxMDAwMDg4NjA5ODdhNzgwMTAwMDB8MTYxNjk2NDUwOTgzMg%3d%3d",
"value": [
{
"@odata.type": "#microsoft.graph.driveProtectionUnit",
"id": "2b014d8c-71fe-4d00-a01a-31850bc5b32c",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"directoryObjectId": "384974e2-72cd-48de-a6e8-6985d7c5db90",
"displayName": "Jefferson Lee", // Newly Added
"email": "lee@contoso.com", // Newly Added
"status": "protectRequested",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.driveProtectionUnit",
"id": "57014d8c-71fe-4d00-a01a-31850bc5b32c",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"directoryObjectId": "184d9337-d8f0-456e-92cd-00a3abdd2093",
"displayName": "Mastura Ibrahim", // Newly Added
"email": "ibrahim@contoso.com", // Newly Added
"status": "protectRequested",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.driveProtectionUnit",
"id": "17014d8c-71fe-4d00-a01a-31850bc5b32c",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"directoryObjectId": "344d9337-d8f0-456e-92cd-00a3abdd2093",
"displayName": "Esmira Musayeva", // Newly Added
"email": "esmira@contoso.com", // Newly Added
"status": "protectRequested",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.driveProtectionUnit",
"id": "8f014d8c-71fe-4d00-a01a-31850bc5b32c",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"directoryObjectId": "781d9337-d8f0-456e-92cd-00a3abdd2093",
"displayName": "Ahmad Hakiki", // Newly Added
"email": "ahmad@contoso.com", // Newly Added
"status": "protectRequested",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
},
{
"@odata.type": "#microsoft.graph.driveProtectionUnit",
"id": "9b014d8c-71fe-4d00-a01a-31850bc5b32c",
"policyId": "9fec8e78-bce4-4aaf-ab1b-5451cc387264",
"directoryObjectId": "2d1d9337-d8f0-456e-92cd-00a3abdd2093",
"displayName": "Jeffry Goh ", // Newly Added
"email": "jeffry@contoso.com", // Newly Added
"status": "protectRequested",
"createdBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"createdDateTime": "2015-06-19T12:01:03.45Z",
"lastModifiedBy": {
"application": {
"id": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
"displayName": "Microsoft Enhanced Restore"
},
"user": {
"email": "User1@contoso.com",
"id": "845457dc-4bb2-4815-bef3-8628ebd1952e",
"displayName": "User1"
}
},
"lastModifiedDateTime": "2015-06-19T12:01:03.45Z",
"error": null
}
]
}