├── .gitignore ├── LICENSE ├── README.md ├── SECURITY.md └── Samples ├── Microsoft Graph And Azure Sentinel Demo.ipynb └── aspnet-angular ├── MicrosoftGraph_Security_API_Sample ├── ClientApp │ ├── .editorconfig │ ├── .vscode │ │ └── settings.json │ ├── angular.json │ ├── e2e │ │ ├── protractor.conf.js │ │ ├── src │ │ │ ├── app.e2e-spec.ts │ │ │ └── app.po.ts │ │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── app │ │ │ ├── app.module.ts │ │ │ ├── app.server.module.ts │ │ │ ├── components │ │ │ │ ├── app.component.css │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.ts │ │ │ │ ├── common │ │ │ │ │ ├── buttons │ │ │ │ │ │ ├── button │ │ │ │ │ │ │ ├── button.component.css │ │ │ │ │ │ │ ├── button.component.html │ │ │ │ │ │ │ └── button.component.ts │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── common-components.module.ts │ │ │ │ │ ├── content-header │ │ │ │ │ │ ├── breadcrumbs │ │ │ │ │ │ │ ├── breadcrumbs.component.css │ │ │ │ │ │ │ ├── breadcrumbs.component.html │ │ │ │ │ │ │ └── breadcrumbs.component.ts │ │ │ │ │ │ ├── content-header.component.css │ │ │ │ │ │ ├── content-header.component.html │ │ │ │ │ │ └── content-header.component.ts │ │ │ │ │ ├── expandable-list │ │ │ │ │ │ ├── expandable-list.component.css │ │ │ │ │ │ ├── expandable-list.component.html │ │ │ │ │ │ └── expandable-list.component.ts │ │ │ │ │ ├── header │ │ │ │ │ │ ├── header-menu │ │ │ │ │ │ │ ├── header-menu.component.css │ │ │ │ │ │ │ ├── header-menu.component.html │ │ │ │ │ │ │ └── header-menu.component.ts │ │ │ │ │ │ ├── header.component.css │ │ │ │ │ │ ├── header.component.html │ │ │ │ │ │ ├── header.component.ts │ │ │ │ │ │ └── user │ │ │ │ │ │ │ ├── user.component.css │ │ │ │ │ │ │ ├── user.component.html │ │ │ │ │ │ │ └── user.component.ts │ │ │ │ │ ├── inputs │ │ │ │ │ │ ├── checkbox-group │ │ │ │ │ │ │ ├── checkbox-group-item │ │ │ │ │ │ │ │ ├── checkbox-group-item.component.css │ │ │ │ │ │ │ │ ├── checkbox-group-item.component.html │ │ │ │ │ │ │ │ └── checkbox-group-item.component.ts │ │ │ │ │ │ │ ├── checkbox-group.component.css │ │ │ │ │ │ │ ├── checkbox-group.component.html │ │ │ │ │ │ │ └── checkbox-group.component.ts │ │ │ │ │ │ ├── checkbox │ │ │ │ │ │ │ ├── checkbox.component.css │ │ │ │ │ │ │ ├── checkbox.component.html │ │ │ │ │ │ │ └── checkbox.component.ts │ │ │ │ │ │ ├── datetime │ │ │ │ │ │ │ ├── datetime-picker.component.css │ │ │ │ │ │ │ ├── datetime-picker.component.html │ │ │ │ │ │ │ └── datetime-picker.component.ts │ │ │ │ │ │ ├── radio │ │ │ │ │ │ │ ├── radio.component.css │ │ │ │ │ │ │ ├── radio.component.html │ │ │ │ │ │ │ └── radio.component.ts │ │ │ │ │ │ ├── select │ │ │ │ │ │ │ ├── select.component.css │ │ │ │ │ │ │ ├── select.component.html │ │ │ │ │ │ │ └── select.component.ts │ │ │ │ │ │ ├── textarea │ │ │ │ │ │ │ ├── textarea.component.css │ │ │ │ │ │ │ ├── textarea.component.html │ │ │ │ │ │ │ └── textarea.component.ts │ │ │ │ │ │ └── textfield │ │ │ │ │ │ │ ├── textfield.component.css │ │ │ │ │ │ │ ├── textfield.component.html │ │ │ │ │ │ │ └── textfield.component.ts │ │ │ │ │ ├── invoke-action-form │ │ │ │ │ │ ├── invoke-action-form.component.css │ │ │ │ │ │ ├── invoke-action-form.component.html │ │ │ │ │ │ └── invoke-action-form.component.ts │ │ │ │ │ ├── loader │ │ │ │ │ │ ├── animation.ts │ │ │ │ │ │ ├── loader.component.css │ │ │ │ │ │ ├── loader.component.html │ │ │ │ │ │ └── loader.component.ts │ │ │ │ │ ├── main-sidebar │ │ │ │ │ │ ├── main-sidebar.component.css │ │ │ │ │ │ ├── main-sidebar.component.html │ │ │ │ │ │ └── main-sidebar.component.ts │ │ │ │ │ ├── modal-container │ │ │ │ │ │ ├── modal-container.component.css │ │ │ │ │ │ ├── modal-container.component.html │ │ │ │ │ │ └── modal-container.component.ts │ │ │ │ │ ├── safe-decode-html-pipe │ │ │ │ │ │ └── safe-decode-html.pipe.ts │ │ │ │ │ ├── secure-score-chart │ │ │ │ │ │ ├── bar-diagram │ │ │ │ │ │ │ ├── bar-diagram.component.css │ │ │ │ │ │ │ ├── bar-diagram.component.html │ │ │ │ │ │ │ └── bar-diagram.component.ts │ │ │ │ │ │ ├── doughnut-diagram │ │ │ │ │ │ │ ├── doughnut-diagram.component.css │ │ │ │ │ │ │ ├── doughnut-diagram.component.html │ │ │ │ │ │ │ └── doughnut-diagram.component.ts │ │ │ │ │ │ ├── secure-score-chart.component.css │ │ │ │ │ │ ├── secure-score-chart.component.html │ │ │ │ │ │ └── secure-score-chart.component.ts │ │ │ │ │ ├── severity-level │ │ │ │ │ │ ├── severity-level.component.css │ │ │ │ │ │ ├── severity-level.component.html │ │ │ │ │ │ └── severity-level.component.ts │ │ │ │ │ ├── user-logo │ │ │ │ │ │ ├── user-logo.component.css │ │ │ │ │ │ ├── user-logo.component.html │ │ │ │ │ │ └── user-logo.component.ts │ │ │ │ │ └── user-panel │ │ │ │ │ │ ├── user-panel.component.css │ │ │ │ │ │ ├── user-panel.component.html │ │ │ │ │ │ └── user-panel.component.ts │ │ │ │ ├── dynamic-form │ │ │ │ │ ├── components │ │ │ │ │ │ ├── dynamic-form-control │ │ │ │ │ │ │ ├── dynamic-form-control.component.css │ │ │ │ │ │ │ ├── dynamic-form-control.component.html │ │ │ │ │ │ │ └── dynamic-form-control.component.ts │ │ │ │ │ │ └── dynamic-form │ │ │ │ │ │ │ ├── dynamic-form.component.css │ │ │ │ │ │ │ ├── dynamic-form.component.html │ │ │ │ │ │ │ └── dynamic-form.component.ts │ │ │ │ │ ├── dynamic-form.module.ts │ │ │ │ │ ├── models │ │ │ │ │ │ ├── control-base.model.ts │ │ │ │ │ │ ├── dropdown-control.model.ts │ │ │ │ │ │ ├── horizontal-textfield-filter.model.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── vertical-textfield-filter.model.ts │ │ │ │ │ └── services │ │ │ │ │ │ └── dynamic-form-control.service.ts │ │ │ │ └── pages │ │ │ │ │ ├── actions │ │ │ │ │ ├── action-list │ │ │ │ │ │ ├── action-item │ │ │ │ │ │ │ ├── action-item.component.css │ │ │ │ │ │ │ ├── action-item.component.html │ │ │ │ │ │ │ └── action-item.component.ts │ │ │ │ │ │ ├── action-list.component.css │ │ │ │ │ │ ├── action-list.component.html │ │ │ │ │ │ └── action-list.component.ts │ │ │ │ │ ├── actions.component.css │ │ │ │ │ ├── actions.component.html │ │ │ │ │ ├── actions.component.ts │ │ │ │ │ ├── actions.module.ts │ │ │ │ │ ├── filters │ │ │ │ │ │ ├── filters.component.css │ │ │ │ │ │ ├── filters.component.html │ │ │ │ │ │ └── filters.component.ts │ │ │ │ │ └── invoke-action-form │ │ │ │ │ │ ├── invoke-action-form.component.css │ │ │ │ │ │ ├── invoke-action-form.component.html │ │ │ │ │ │ └── invoke-action-form.component.ts │ │ │ │ │ ├── alert-details │ │ │ │ │ ├── alert-details.component.css │ │ │ │ │ ├── alert-details.component.html │ │ │ │ │ ├── alert-details.component.ts │ │ │ │ │ ├── alert-details.module.ts │ │ │ │ │ ├── common │ │ │ │ │ │ ├── boolean-clickable-property │ │ │ │ │ │ │ ├── boolean-clickable-property.component.css │ │ │ │ │ │ │ ├── boolean-clickable-property.component.html │ │ │ │ │ │ │ └── boolean-clickable-property.component.ts │ │ │ │ │ │ ├── boolean-pipe │ │ │ │ │ │ │ └── boolean.pipe.ts │ │ │ │ │ │ ├── clickable-property │ │ │ │ │ │ │ ├── clickable-property.component.css │ │ │ │ │ │ │ ├── clickable-property.component.html │ │ │ │ │ │ │ └── clickable-property.component.ts │ │ │ │ │ │ ├── datetime-clickable-property │ │ │ │ │ │ │ ├── datetime-clickable-property.component.css │ │ │ │ │ │ │ ├── datetime-clickable-property.component.html │ │ │ │ │ │ │ └── datetime-clickable-property.component.ts │ │ │ │ │ │ ├── host-clickable-property │ │ │ │ │ │ │ ├── host-clickable-property.component.css │ │ │ │ │ │ │ ├── host-clickable-property.component.html │ │ │ │ │ │ │ └── host-clickable-property.component.ts │ │ │ │ │ │ ├── radio-clickable-property │ │ │ │ │ │ │ ├── radio-clickable-property.component.css │ │ │ │ │ │ │ ├── radio-clickable-property.component.html │ │ │ │ │ │ │ └── radio-clickable-property.component.ts │ │ │ │ │ │ └── user-clickable-property │ │ │ │ │ │ │ ├── user-clickable-property.component.css │ │ │ │ │ │ │ ├── user-clickable-property.component.html │ │ │ │ │ │ │ └── user-clickable-property.component.ts │ │ │ │ │ ├── details-items │ │ │ │ │ │ ├── activity-history │ │ │ │ │ │ │ ├── activity-history-item │ │ │ │ │ │ │ │ ├── activity-history-item.component.css │ │ │ │ │ │ │ │ ├── activity-history-item.component.html │ │ │ │ │ │ │ │ └── activity-history-item.component.ts │ │ │ │ │ │ │ ├── activity-history.component.css │ │ │ │ │ │ │ ├── activity-history.component.html │ │ │ │ │ │ │ └── activity-history.component.ts │ │ │ │ │ │ ├── cloud-app-state-list │ │ │ │ │ │ │ ├── cloud-app-state-item │ │ │ │ │ │ │ │ ├── cloud-app-state-item.component.css │ │ │ │ │ │ │ │ ├── cloud-app-state-item.component.html │ │ │ │ │ │ │ │ └── cloud-app-state-item.component.ts │ │ │ │ │ │ │ ├── cloud-app-state-list.component.css │ │ │ │ │ │ │ ├── cloud-app-state-list.component.html │ │ │ │ │ │ │ └── cloud-app-state-list.component.ts │ │ │ │ │ │ ├── file-list │ │ │ │ │ │ │ ├── file-list-item │ │ │ │ │ │ │ │ ├── file-list-item.component.css │ │ │ │ │ │ │ │ ├── file-list-item.component.html │ │ │ │ │ │ │ │ └── file-list-item.component.ts │ │ │ │ │ │ │ ├── file-list.component.css │ │ │ │ │ │ │ ├── file-list.component.html │ │ │ │ │ │ │ └── file-list.component.ts │ │ │ │ │ │ ├── host-list │ │ │ │ │ │ │ ├── host-item │ │ │ │ │ │ │ │ ├── host-item.component.css │ │ │ │ │ │ │ │ ├── host-item.component.html │ │ │ │ │ │ │ │ └── host-item.component.ts │ │ │ │ │ │ │ ├── host-list.component.css │ │ │ │ │ │ │ ├── host-list.component.html │ │ │ │ │ │ │ └── host-list.component.ts │ │ │ │ │ │ ├── malware-state-list │ │ │ │ │ │ │ ├── malware-state-item │ │ │ │ │ │ │ │ ├── malware-state-item.component.css │ │ │ │ │ │ │ │ ├── malware-state-item.component.html │ │ │ │ │ │ │ │ └── malware-state-item.component.ts │ │ │ │ │ │ │ ├── malware-state-list.component.css │ │ │ │ │ │ │ ├── malware-state-list.component.html │ │ │ │ │ │ │ └── malware-state-list.component.ts │ │ │ │ │ │ ├── network-connection-list │ │ │ │ │ │ │ ├── network-connection-item │ │ │ │ │ │ │ │ ├── network-connection-item.component.css │ │ │ │ │ │ │ │ ├── network-connection-item.component.html │ │ │ │ │ │ │ │ └── network-connection-item.component.ts │ │ │ │ │ │ │ ├── network-connection-list.component.css │ │ │ │ │ │ │ ├── network-connection-list.component.html │ │ │ │ │ │ │ └── network-connection-list.component.ts │ │ │ │ │ │ ├── process-list │ │ │ │ │ │ │ ├── process-item │ │ │ │ │ │ │ │ ├── process-item.component.css │ │ │ │ │ │ │ │ ├── process-item.component.html │ │ │ │ │ │ │ │ └── process-item.component.ts │ │ │ │ │ │ │ ├── process-list.component.css │ │ │ │ │ │ │ ├── process-list.component.html │ │ │ │ │ │ │ └── process-list.component.ts │ │ │ │ │ │ ├── registry-key-update-list │ │ │ │ │ │ │ ├── registry-key-update-item │ │ │ │ │ │ │ │ ├── registry-key-update-item.component.css │ │ │ │ │ │ │ │ ├── registry-key-update-item.component.html │ │ │ │ │ │ │ │ └── registry-key-update-item.component.ts │ │ │ │ │ │ │ ├── registry-key-update-list.component.css │ │ │ │ │ │ │ ├── registry-key-update-list.component.html │ │ │ │ │ │ │ └── registry-key-update-list.component.ts │ │ │ │ │ │ ├── string-list │ │ │ │ │ │ │ ├── string-list.component.css │ │ │ │ │ │ │ ├── string-list.component.html │ │ │ │ │ │ │ └── string-list.component.ts │ │ │ │ │ │ ├── trigger-list │ │ │ │ │ │ │ ├── trigger-item │ │ │ │ │ │ │ │ ├── trigger-item.component.css │ │ │ │ │ │ │ │ ├── trigger-item.component.html │ │ │ │ │ │ │ │ └── trigger-item.component.ts │ │ │ │ │ │ │ ├── trigger-list.component.css │ │ │ │ │ │ │ ├── trigger-list.component.html │ │ │ │ │ │ │ └── trigger-list.component.ts │ │ │ │ │ │ ├── url-list │ │ │ │ │ │ │ ├── url-list.component.css │ │ │ │ │ │ │ ├── url-list.component.html │ │ │ │ │ │ │ └── url-list.component.ts │ │ │ │ │ │ ├── user-list │ │ │ │ │ │ │ ├── user-item │ │ │ │ │ │ │ │ ├── user-item.component.css │ │ │ │ │ │ │ │ ├── user-item.component.html │ │ │ │ │ │ │ │ └── user-item.component.ts │ │ │ │ │ │ │ ├── user-list.component.css │ │ │ │ │ │ │ ├── user-list.component.html │ │ │ │ │ │ │ └── user-list.component.ts │ │ │ │ │ │ └── vulnerability-state-list │ │ │ │ │ │ │ ├── vulnerability-state-item │ │ │ │ │ │ │ ├── vulnerability-state-item.component.css │ │ │ │ │ │ │ ├── vulnerability-state-item.component.html │ │ │ │ │ │ │ └── vulnerability-state-item.component.ts │ │ │ │ │ │ │ ├── vulnerability-state-list.component.css │ │ │ │ │ │ │ ├── vulnerability-state-list.component.html │ │ │ │ │ │ │ └── vulnerability-state-list.component.ts │ │ │ │ │ ├── header │ │ │ │ │ │ ├── header.component.css │ │ │ │ │ │ ├── header.component.html │ │ │ │ │ │ └── header.component.ts │ │ │ │ │ ├── main-info │ │ │ │ │ │ ├── main-info.component.css │ │ │ │ │ │ ├── main-info.component.html │ │ │ │ │ │ └── main-info.component.ts │ │ │ │ │ └── update-alert-form │ │ │ │ │ │ ├── update-alert-form.component.css │ │ │ │ │ │ ├── update-alert-form.component.html │ │ │ │ │ │ └── update-alert-form.component.ts │ │ │ │ │ ├── alerts │ │ │ │ │ ├── alert-list │ │ │ │ │ │ ├── alert-item │ │ │ │ │ │ │ ├── alert-item.component.css │ │ │ │ │ │ │ ├── alert-item.component.html │ │ │ │ │ │ │ └── alert-item.component.ts │ │ │ │ │ │ ├── alert-list.component.css │ │ │ │ │ │ ├── alert-list.component.html │ │ │ │ │ │ ├── alert-list.component.ts │ │ │ │ │ │ └── display-name-pipe │ │ │ │ │ │ │ └── display-name.pipe.ts │ │ │ │ │ ├── alerts.component.css │ │ │ │ │ ├── alerts.component.html │ │ │ │ │ ├── alerts.component.ts │ │ │ │ │ ├── alerts.module.ts │ │ │ │ │ ├── filters │ │ │ │ │ │ ├── filters.component.css │ │ │ │ │ │ ├── filters.component.html │ │ │ │ │ │ └── filters.component.ts │ │ │ │ │ └── query-list │ │ │ │ │ │ ├── query-item │ │ │ │ │ │ ├── query-item.component.css │ │ │ │ │ │ ├── query-item.component.html │ │ │ │ │ │ └── query-item.component.ts │ │ │ │ │ │ ├── query-list.component.css │ │ │ │ │ │ ├── query-list.component.html │ │ │ │ │ │ └── query-list.component.ts │ │ │ │ │ ├── dashboard │ │ │ │ │ ├── dashboard-list │ │ │ │ │ │ ├── dashboard-item │ │ │ │ │ │ │ ├── dashboard-item.component.css │ │ │ │ │ │ │ ├── dashboard-item.component.html │ │ │ │ │ │ │ └── dashboard-item.component.ts │ │ │ │ │ │ ├── dashboard-list.component.css │ │ │ │ │ │ ├── dashboard-list.component.html │ │ │ │ │ │ └── dashboard-list.component.ts │ │ │ │ │ ├── dashboard.component.css │ │ │ │ │ ├── dashboard.component.html │ │ │ │ │ ├── dashboard.component.ts │ │ │ │ │ ├── dashboard.module.ts │ │ │ │ │ ├── operation-statuses-alerts │ │ │ │ │ │ ├── operation-status-alerts │ │ │ │ │ │ │ ├── doughnut-chart │ │ │ │ │ │ │ │ ├── doughnut-chart.component.css │ │ │ │ │ │ │ │ ├── doughnut-chart.component.html │ │ │ │ │ │ │ │ └── doughnut-chart.component.ts │ │ │ │ │ │ │ ├── operation-status-alerts.component.css │ │ │ │ │ │ │ ├── operation-status-alerts.component.html │ │ │ │ │ │ │ └── operation-status-alerts.component.ts │ │ │ │ │ │ ├── operation-statuses-alerts.component.css │ │ │ │ │ │ ├── operation-statuses-alerts.component.html │ │ │ │ │ │ └── operation-statuses-alerts.component.ts │ │ │ │ │ └── severity-levels-alerts │ │ │ │ │ │ ├── severity-level-alerts │ │ │ │ │ │ ├── severity-level-alerts.component.css │ │ │ │ │ │ ├── severity-level-alerts.component.html │ │ │ │ │ │ └── severity-level-alerts.component.ts │ │ │ │ │ │ ├── severity-levels-alerts.component.css │ │ │ │ │ │ ├── severity-levels-alerts.component.html │ │ │ │ │ │ └── severity-levels-alerts.component.ts │ │ │ │ │ ├── secure-score │ │ │ │ │ ├── components │ │ │ │ │ │ └── secure-score-expandable-list │ │ │ │ │ │ │ ├── secure-score-expandable-list.component.css │ │ │ │ │ │ │ ├── secure-score-expandable-list.component.html │ │ │ │ │ │ │ └── secure-score-expandable-list.component.ts │ │ │ │ │ ├── secure-score.component.css │ │ │ │ │ ├── secure-score.component.html │ │ │ │ │ ├── secure-score.component.ts │ │ │ │ │ └── secure-score.module.ts │ │ │ │ │ └── subscriptions │ │ │ │ │ ├── filters │ │ │ │ │ ├── filters.component.css │ │ │ │ │ ├── filters.component.html │ │ │ │ │ └── filters.component.ts │ │ │ │ │ ├── query-list │ │ │ │ │ ├── query-item │ │ │ │ │ │ ├── query-item.component.css │ │ │ │ │ │ ├── query-item.component.html │ │ │ │ │ │ └── query-item.component.ts │ │ │ │ │ ├── query-list.component.css │ │ │ │ │ ├── query-list.component.html │ │ │ │ │ └── query-list.component.ts │ │ │ │ │ ├── subscription-list │ │ │ │ │ ├── subscription-item │ │ │ │ │ │ ├── subscription-item.component.css │ │ │ │ │ │ ├── subscription-item.component.html │ │ │ │ │ │ └── subscription-item.component.ts │ │ │ │ │ ├── subscription-list.component.css │ │ │ │ │ ├── subscription-list.component.html │ │ │ │ │ └── subscription-list.component.ts │ │ │ │ │ ├── subscriptions.component.css │ │ │ │ │ ├── subscriptions.component.html │ │ │ │ │ ├── subscriptions.component.ts │ │ │ │ │ └── subscriptions.module.ts │ │ │ ├── models │ │ │ │ ├── app │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── loader-state.model.ts │ │ │ │ │ └── modal-window.model.ts │ │ │ │ ├── graph │ │ │ │ │ ├── action.model.ts │ │ │ │ │ ├── alert-details.model.ts │ │ │ │ │ ├── alert-history-state.model.ts │ │ │ │ │ ├── alert-statistic.model.ts │ │ │ │ │ ├── alert.model.ts │ │ │ │ │ ├── average-comparative-score.model.ts │ │ │ │ │ ├── cloud-app-security-state.model.ts │ │ │ │ │ ├── control-score.model.ts │ │ │ │ │ ├── control-state-update.model.ts │ │ │ │ │ ├── device.model.ts │ │ │ │ │ ├── file-security-state.model.ts │ │ │ │ │ ├── host-security-state.model.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── malware-state.model.ts │ │ │ │ │ ├── network-connection.model.ts │ │ │ │ │ ├── process.model.ts │ │ │ │ │ ├── registry-key-state.model.ts │ │ │ │ │ ├── risky-user.model.ts │ │ │ │ │ ├── secure-score-control-profile.model.ts │ │ │ │ │ ├── secure-score-details.model.ts │ │ │ │ │ ├── secure-score.model.ts │ │ │ │ │ ├── security-vendor.model.ts │ │ │ │ │ ├── subscription.model.ts │ │ │ │ │ ├── trigger.model.ts │ │ │ │ │ ├── user-security-state.model.ts │ │ │ │ │ ├── user.model.ts │ │ │ │ │ └── vulnerability-state.model.ts │ │ │ │ ├── request │ │ │ │ │ ├── action-create.model.ts │ │ │ │ │ ├── alert-update.model.ts │ │ │ │ │ └── index.ts │ │ │ │ └── response │ │ │ │ │ ├── action-filter-data.model.ts │ │ │ │ │ ├── action-values.model.ts │ │ │ │ │ ├── alert-filter-data.model.ts │ │ │ │ │ ├── alert-search-result.model.ts │ │ │ │ │ ├── alert-values.model.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── queries.model.ts │ │ │ │ │ ├── secure-score-details-response.model.ts │ │ │ │ │ ├── secure-score-result.model.ts │ │ │ │ │ ├── subscription-filter-data.model.ts │ │ │ │ │ └── subscruption-search-result.model.ts │ │ │ ├── routing │ │ │ │ ├── app-routing.module.spec.ts │ │ │ │ └── app-routing.module.ts │ │ │ └── services │ │ │ │ ├── action-filter.service.ts │ │ │ │ ├── action-values.service.ts │ │ │ │ ├── action.service.ts │ │ │ │ ├── alert-filter.service.ts │ │ │ │ ├── alert-values.service.ts │ │ │ │ ├── alert.service.ts │ │ │ │ ├── dashboard.service.ts │ │ │ │ ├── http.service.ts │ │ │ │ ├── index.ts │ │ │ │ ├── loader.service.ts │ │ │ │ ├── modal-windows.service.ts │ │ │ │ ├── secure-score.service.ts │ │ │ │ ├── subscription-filter.service.ts │ │ │ │ ├── subscription.service.ts │ │ │ │ └── user.service.ts │ │ ├── assets │ │ │ ├── .gitkeep │ │ │ └── fonts │ │ │ │ ├── segoeui.ttf │ │ │ │ ├── segoeuib.ttf │ │ │ │ ├── segoeuii.ttf │ │ │ │ └── segoeuiz.ttf │ │ ├── browserslist │ │ ├── environments │ │ │ ├── environment.interface.ts │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── index.html │ │ ├── karma.conf.js │ │ ├── main.ts │ │ ├── polyfills.ts │ │ ├── styles.css │ │ ├── test.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.server.json │ │ ├── tsconfig.spec.json │ │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json ├── Controllers │ ├── ActionController.cs │ ├── AlertController.cs │ ├── NotificationController.cs │ ├── SecureScoreController.cs │ └── SubscriptionController.cs ├── Extensions │ ├── AlertExtensions.cs │ ├── AzureAdServiceCollectionExtensions.cs │ ├── DeviceExtensions.cs │ ├── GlobalExtensions.cs │ ├── MvcOptionsExtensions.cs │ └── SecurityActionExtensions.cs ├── Helpers │ ├── IAuthProvider.cs │ ├── IMemoryCacheHelper.cs │ ├── JsonStringResult.cs │ ├── MemoryCacheHelper.cs │ ├── SDKHelper.cs │ ├── SampleAuthProvider.cs │ └── SessionTokenCache.cs ├── MicrosoftGraph_Security_API_Sample.csproj ├── Models │ ├── AuthResult.cs │ ├── Configurations │ │ ├── AzureConfiguration.cs │ │ └── CacheTime.cs │ ├── DomainModels │ │ ├── AlertFilterModel.cs │ │ ├── AlertHistoryState.cs │ │ ├── AlertStatisticModel.cs │ │ ├── AlertTestSecurityDev.cs │ │ ├── MockData.cs │ │ ├── RiskyUser.cs │ │ ├── SecureScoreControlProfileModel.cs │ │ ├── SecurityAction.cs │ │ ├── SecurityActionBase.cs │ │ ├── SecurityActionState.cs │ │ └── UserAccountDevice.cs │ ├── Notification.cs │ ├── NotificationCollection.cs │ ├── NotificationHub.cs │ ├── Requests │ │ ├── AlertUpdateRequest.cs │ │ └── SecurityActionRequest.cs │ ├── Responses │ │ ├── ActionResponse.cs │ │ ├── AlertDetailsResponse.cs │ │ ├── AlertFilterResponse.cs │ │ ├── AlertStatisticResponse.cs │ │ ├── AlertUpdatedResponse.cs │ │ ├── AlertsResponse.cs │ │ ├── RiskyUsersResponse.cs │ │ ├── SecureScoreDetailsResponse.cs │ │ ├── SecurityActionResponse.cs │ │ └── SubscriptionResponse.cs │ ├── SecureScore.cs │ ├── SecureScoreControlProfile.cs │ ├── SubscriptionResultModel.cs │ ├── UpdateAlertResultItemModel.cs │ ├── UpdateAlertResultModel.cs │ ├── UserPictureModel.cs │ └── ViewModels │ │ ├── AlertDetailsViewModel.cs │ │ ├── AlertFilterViewModel.cs │ │ ├── AlertResultItemModel.cs │ │ ├── AlertStatisticViewModel.cs │ │ ├── ManageAlertViewModel.cs │ │ ├── ResultQueriesViewModel.cs │ │ └── SecureScoreDetailsViewModel.cs ├── Program.cs ├── Providers │ ├── AlertFilterValueBinderProvider.cs │ ├── AlertFilterValueEntityBinder.cs │ ├── GraphQueryProvider.cs │ ├── GraphServiceProvider.cs │ ├── IGraphServiceProvider.cs │ ├── ITokenProvider.cs │ └── TokenProvider.cs ├── Scripts │ ├── signalr.js │ └── signalr.min.js ├── Services │ ├── ActionService.cs │ ├── AlertService.cs │ ├── DemoExample.cs │ ├── GraphService.cs │ ├── Interfaces │ │ ├── IActionService.cs │ │ ├── IAlertService.cs │ │ ├── IDemoExample.cs │ │ ├── IGraphService.cs │ │ └── INotificationService.cs │ └── NotificationService.cs ├── Startup.cs ├── Views │ ├── Home │ │ └── About.cshtml │ └── Notification │ │ └── Notification.cshtml ├── appsettings.Development.json ├── appsettings.Production.json ├── appsettings.json └── mockData.json ├── MicrosoftGraph_Security_API_Sample_V3.0.sln ├── README.md └── readme-images ├── 1.dashboardcollapsed.png ├── 2.dashboardexpanded.png ├── 3.alertslist.png ├── 4.alertdetails.png ├── 5.managealert.png ├── 6.invokeaction.png ├── 7.actionslist.png ├── 8.subscriptionslist.png ├── 9.securescore.png ├── ActiveSubscriptions.PNG ├── AdminConsent.PNG ├── GrantError.png ├── NotificationPage.JPG ├── Scope.PNG ├── SecurityRole.png ├── UI1.JPG ├── VSSettings.JPG ├── ngrok.JPG ├── ngrok1.PNG └── ngrok2.PNG /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "adal" 4 | ] 5 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getMainHeading()).toEqual('Hello, world!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getMainHeading() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/app.server.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ServerModule } from '@angular/platform-server'; 3 | import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader'; 4 | import { AppComponent } from './components/app.component'; 5 | import { AppModule } from './app.module'; 6 | 7 | @NgModule({ 8 | imports: [AppModule, ServerModule, ModuleMapLoaderModule], 9 | bootstrap: [AppComponent] 10 | }) 11 | export class AppServerModule { } 12 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/app.component.css: -------------------------------------------------------------------------------- 1 | .container { 2 | position: absolute; 3 | top: 40px; 4 | bottom: 0px; 5 | left: 0px; 6 | right: 0px; 7 | display: flex; 8 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/app.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 |
7 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/buttons/button/button.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | width: 120px; 4 | height: 32px; 5 | background: #0078D7; 6 | color: white; 7 | font-family: SegoeUI; 8 | font-size: 14px; 9 | } 10 | 11 | .button { 12 | width: 100%; 13 | display: flex; 14 | justify-content: center; 15 | align-items: center; 16 | } 17 | 18 | :host.disabled { 19 | cursor: not-allowed; 20 | } 21 | 22 | :host:not(.disabled):hover { 23 | cursor: pointer; 24 | background: #0088E7; 25 | } 26 | 27 | :host:not(.disabled):active { 28 | background: #0078D7; 29 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/buttons/button/button.component.html: -------------------------------------------------------------------------------- 1 | 2 | {{ title }} 3 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/buttons/button/button.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter, HostBinding } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-button', 5 | templateUrl: './button.component.html', 6 | styleUrls: ['./button.component.css'] 7 | }) 8 | export class ButtonComponent { 9 | @Input() title: string; 10 | @Input() @HostBinding('class.disabled') disabled: boolean; 11 | @Output() btnClick: EventEmitter; 12 | 13 | public constructor() { 14 | this.btnClick = new EventEmitter(); 15 | } 16 | 17 | public onClick(): void { 18 | // tslint:disable-next-line:no-unused-expression 19 | !this.disabled && this.btnClick.emit(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/buttons/index.ts: -------------------------------------------------------------------------------- 1 | export { ButtonComponent } from './button/button.component'; 2 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/content-header/breadcrumbs/breadcrumbs.component.css: -------------------------------------------------------------------------------- 1 | .breadcrumbs-container { 2 | display: flex; 3 | justify-content: flex-start; 4 | align-items: center; 5 | } 6 | 7 | .breadcrumbs-container>.breadcrumb { 8 | font-family: SegoeUI; 9 | font-size: 12px; 10 | color: #0078D7; 11 | text-decoration: none; 12 | } 13 | 14 | .breadcrumbs-container>.breadcrumb:hover { 15 | color: #2D2D2D; 16 | } 17 | 18 | .breadcrumbs-container>.breadcrumb:not(:last-child)::after { 19 | content: ">"; 20 | color: #0078D7; 21 | margin: 0 5px 0 3px; 22 | cursor: default; 23 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/content-header/breadcrumbs/breadcrumbs.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/content-header/breadcrumbs/breadcrumbs.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | export interface BreadcrumbItem { 4 | Title: string; 5 | URL: string; 6 | } 7 | 8 | @Component({ 9 | selector: 'app-breadcrumbs', 10 | templateUrl: './breadcrumbs.component.html', 11 | styleUrls: ['./breadcrumbs.component.css'] 12 | }) 13 | export class BreadcrumbsComponent { 14 | @Input() items: BreadcrumbItem[]; 15 | } 16 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/content-header/content-header.component.css: -------------------------------------------------------------------------------- 1 | .titles { 2 | display: flex; 3 | justify-content: space-between; 4 | align-items: flex-start; 5 | } 6 | 7 | .title.filters { 8 | width: 326px; 9 | flex-shrink: 0; 10 | display: flex; 11 | justify-content: flex-start; 12 | align-items: center; 13 | cursor: pointer; 14 | } 15 | 16 | .title.filters>svg { 17 | margin: 2px 6px 0 15px; 18 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/content-header/content-header.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | 9 | 10 | filters 11 |
12 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/content-header/content-header.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, HostBinding, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { BreadcrumbItem } from './breadcrumbs/breadcrumbs.component'; 4 | 5 | @Component({ 6 | selector: 'app-content-header', 7 | templateUrl: './content-header.component.html', 8 | styleUrls: ['./content-header.component.css'] 9 | }) 10 | export class ContentHeaderComponent { 11 | @Input() breadcrumbItems: BreadcrumbItem[]; 12 | @Input() title: string; 13 | @Input() isFiltersEnabled = false; 14 | @Output() filterClick: EventEmitter; 15 | 16 | @HostBinding('class.page-content-linear-container') hostClass = true; 17 | 18 | public constructor() { 19 | this.filterClick = new EventEmitter(); 20 | } 21 | 22 | public onFilterClick(): void { 23 | this.filterClick.emit(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/expandable-list/expandable-list.component.html: -------------------------------------------------------------------------------- 1 |
2 | {{ title }} 3 | 4 | 6 | 7 |
8 |
9 | 10 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/expandable-list/expandable-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-expandable-list', 5 | templateUrl: './expandable-list.component.html', 6 | styleUrls: ['./expandable-list.component.css'] 7 | }) 8 | export class ExpandableListComponent { 9 | @Input() public title: string; 10 | @Input() public isExpanded = false; 11 | 12 | public toggle(): void { 13 | this.isExpanded = !this.isExpanded; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/header/header-menu/header-menu.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | width: 40px; 3 | height: 40px; 4 | } 5 | 6 | :host>div { 7 | display: flex; 8 | width: 100%; 9 | height: 100%; 10 | justify-content: center; 11 | align-items: center; 12 | } 13 | 14 | :host(:hover) { 15 | background: rgba(255, 255, 255, 0.07); 16 | cursor: pointer; 17 | } 18 | 19 | :host(:active) { 20 | background: rgba(255, 255, 255, 0.03); 21 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/header/header-menu/header-menu.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 6 | 7 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/header/header-menu/header-menu.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-header-menu', 5 | templateUrl: './header-menu.component.html', 6 | styleUrls: ['./header-menu.component.css'] 7 | }) 8 | export class HeaderMenuComponent { 9 | public items = []; 10 | 11 | public openMenu(): void { } 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/header/header.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | {{title}} 4 |
5 | 7 | 8 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/header/header.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, HostBinding } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-header', 5 | templateUrl: './header.component.html', 6 | styleUrls: ['./header.component.css'] 7 | }) 8 | export class HeaderComponent { 9 | public title = 'Microsoft Graph Security Demo'; 10 | 11 | @HostBinding('class.header-container') hostClass = true; 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/header/user/user.component.css: -------------------------------------------------------------------------------- 1 | .header-user-container { 2 | display: flex; 3 | justify-content: center; 4 | align-items: center; 5 | width: 40px; 6 | height: 40px; 7 | } 8 | 9 | .header-user-container:hover { 10 | cursor: pointer; 11 | background: rgba(255, 255, 255, 0.07); 12 | } 13 | 14 | .header-user-container:active { 15 | background: rgba(255, 255, 255, 0.03); 16 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/header/user/user.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/header/user/user.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | // models 3 | import { ILogoUser } from '../../user-logo/user-logo.component'; 4 | // services 5 | import { UserService } from 'src/app/services/user.service'; 6 | 7 | @Component({ 8 | selector: 'app-header-user-info', 9 | templateUrl: './user.component.html', 10 | styleUrls: ['./user.component.css'] 11 | }) 12 | export class UserComponent { 13 | public user: ILogoUser; 14 | 15 | public constructor(private userService: UserService) { 16 | const msalUser = this.userService.getCurrentUser(); 17 | if (msalUser) { 18 | this.user = { displayName: msalUser.name }; 19 | } 20 | } 21 | 22 | public userClick(): void { 23 | this.userService.toggleUserPanel(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/inputs/checkbox-group/checkbox-group-item/checkbox-group-item.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 7 | 8 |
9 |
10 | 11 |
12 | 13 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/inputs/checkbox-group/checkbox-group-item/checkbox-group-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-checkbox-group-item', 5 | templateUrl: './checkbox-group-item.component.html', 6 | styleUrls: ['./checkbox-group-item.component.css'] 7 | }) 8 | export class CheckboxGroupItemComponent { 9 | @Input() key: string; 10 | @Input() title: string; 11 | @Input() isLevel: boolean; 12 | @Input() checked: boolean; 13 | @Output() toggle: EventEmitter; 14 | 15 | constructor() { 16 | this.toggle = new EventEmitter(); 17 | } 18 | 19 | toggleCheck() { 20 | // this.item.checked = !this.item.checked; 21 | this.toggle.emit(this.key); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/inputs/checkbox-group/checkbox-group.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | } 5 | 6 | :host>label { 7 | font-family: SegoeUI; 8 | font-size: 14px; 9 | color: #2D2D2D; 10 | text-transform: capitalize; 11 | margin-bottom: 10px; 12 | } 13 | 14 | :host app-checkbox-group-item:not(:last-child) { 15 | margin-bottom: 19px; 16 | } 17 | 18 | :host .expand-icon { 19 | display: flex; 20 | justify-content: center; 21 | align-items: center; 22 | cursor: pointer; 23 | width: 20px; 24 | height: 10px; 25 | } 26 | 27 | :host .expand-icon:hover {} -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/inputs/checkbox/checkbox.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 7 | 8 |
9 | 10 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/inputs/datetime/datetime-picker.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | justify-content: center; 4 | align-items: stretch; 5 | flex-direction: column; 6 | position: relative; 7 | } 8 | 9 | :host>label { 10 | font-family: SegoeUI; 11 | font-size: 14px; 12 | color: #2D2D2D; 13 | overflow: hidden; 14 | white-space: nowrap; 15 | text-overflow: ellipsis; 16 | text-transform: capitalize; 17 | margin-bottom: 6px; 18 | } 19 | 20 | :host>input { 21 | display: flex; 22 | justify-content: flex-start; 23 | align-items: center; 24 | flex-grow: 1; 25 | height: 26px; 26 | font-family: SegoeUI; 27 | font-size: 14px; 28 | color: rgba(0, 0, 0, 0.6); 29 | padding: 0 10px; 30 | border: 2px solid rgba(0, 0, 0, 0.4); 31 | cursor: pointer; 32 | } 33 | 34 | :host>svg { 35 | position: absolute; 36 | bottom: 10px; 37 | right: 10px; 38 | cursor: pointer; 39 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/inputs/radio/radio.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/inputs/select/select.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | {{ selectedOption || placeholder }} 4 | 5 | 7 | 8 |
9 |
10 | 11 |
13 | {{ option }} 14 |
15 |
No items for select
16 |
17 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/inputs/textarea/textarea.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | justify-content: flex-start; 4 | align-items: center; 5 | } 6 | 7 | :host(.vertical) { 8 | justify-content: center; 9 | align-items: stretch; 10 | flex-direction: column; 11 | } 12 | 13 | :host>label { 14 | font-family: SegoeUI; 15 | font-size: 14px; 16 | color: #2D2D2D; 17 | width: 100px; 18 | overflow: hidden; 19 | white-space: nowrap; 20 | text-overflow: ellipsis; 21 | margin-right: 15px; 22 | text-transform: capitalize; 23 | } 24 | 25 | :host(.vertical > label) { 26 | width: auto; 27 | margin-right: 0px; 28 | margin-bottom: 6px; 29 | } 30 | 31 | :host>textarea { 32 | display: flex; 33 | justify-content: flex-start; 34 | align-items: center; 35 | flex-grow: 1; 36 | font-family: SegoeUI; 37 | font-size: 14px; 38 | color: rgba(0, 0, 0, 0.6); 39 | padding: 5px 10px; 40 | border: 2px solid rgba(0, 0, 0, 0.4); 41 | resize: none; 42 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/inputs/textarea/textarea.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/invoke-action-form/invoke-action-form.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | background: white; 5 | flex-grow: 1; 6 | padding: 16px 22px; 7 | } 8 | 9 | :host>label { 10 | font-family: SegoeUI; 11 | font-size: 20px; 12 | color: black; 13 | font-weight: bold; 14 | } 15 | 16 | .form-row { 17 | margin-top: 12px; 18 | } 19 | 20 | .form-actions { 21 | margin-top: 16px; 22 | display: flex; 23 | justify-content: flex-end; 24 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/loader/animation.ts: -------------------------------------------------------------------------------- 1 | import { trigger, transition, style, animate } from '@angular/animations'; 2 | 3 | export const FadeInOut = trigger('fadeInOut', [ 4 | transition(':enter', [ // :enter is alias to 'void => *' 5 | style({ opacity: 0 }), 6 | animate(300, style({ opacity: 1 })) 7 | ]), 8 | transition(':leave', [ // :leave is alias to '* => void' 9 | animate(300, style({ opacity: 0 })) 10 | ]) 11 | ]); 12 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/loader/loader.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
{{ message }}
20 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/loader/loader.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | // animations 3 | import { FadeInOut } from './animation'; 4 | 5 | @Component({ 6 | selector: 'app-loader', 7 | templateUrl: 'loader.component.html', 8 | styleUrls: ['loader.component.css'], 9 | animations: [FadeInOut] 10 | }) 11 | export class LoaderComponent { 12 | @Input() message: string; 13 | } 14 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/main-sidebar/main-sidebar.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, HostBinding } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-main-sidebar', 5 | templateUrl: './main-sidebar.component.html', 6 | styleUrls: ['./main-sidebar.component.css'] 7 | }) 8 | export class MainSidebarComponent { 9 | @HostBinding('class.sidebar-container') hostClass = true; 10 | @HostBinding('class.expanded') isExpanded = false; 11 | 12 | public toggle() { 13 | this.isExpanded = !this.isExpanded; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/modal-container/modal-container.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/modal-container/modal-container.component.css -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/modal-container/modal-container.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/modal-container/modal-container.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, OnDestroy } from '@angular/core'; 2 | // models 3 | import { LoaderState } from 'src/app/models/app'; 4 | // services 5 | import { LoaderService } from 'src/app/services/loader.service'; 6 | 7 | @Component({ 8 | selector: 'app-modal-container', 9 | templateUrl: 'modal-container.component.html', 10 | styleUrls: ['modal-container.component.css'] 11 | }) 12 | export class ModalContainerComponent implements OnInit, OnDestroy { 13 | // Loader 14 | public loaderState: LoaderState; 15 | 16 | constructor(private loader: LoaderService) { } 17 | 18 | ngOnInit(): void { 19 | // Subscribe to the show/hide windows events 20 | this.loader.Event.subscribe((newState: LoaderState) => { 21 | this.loaderState = newState; 22 | }); 23 | } 24 | 25 | ngOnDestroy(): void { 26 | // Unsubscribe to the show/hide windows events 27 | this.loader.Event.unsubscribe(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/safe-decode-html-pipe/safe-decode-html.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | import { DomSanitizer } from '@angular/platform-browser'; 3 | 4 | @Pipe({ name: 'safeDecodeHtml' }) 5 | export class SafeDecodeHtmlPipe implements PipeTransform { 6 | 7 | constructor(private sanitizer: DomSanitizer) { } 8 | 9 | transform(encodedHtml) { 10 | const textAreaTag = document.createElement('textarea'); 11 | textAreaTag.innerHTML = encodedHtml; 12 | return this.sanitizer.bypassSecurityTrustHtml(textAreaTag.value); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/secure-score-chart/bar-diagram/bar-diagram.component.css: -------------------------------------------------------------------------------- 1 | :host{ 2 | display: flex; 3 | align-items: center; 4 | } 5 | 6 | .bar { 7 | display: flex; 8 | flex-direction: column; 9 | position: relative; 10 | } 11 | 12 | .bar span { 13 | font-size: 14px; 14 | font-weight: bold; 15 | margin: 0 0 20px 0; 16 | } 17 | 18 | .values { 19 | display: flex; 20 | justify-content: flex-end; 21 | position: absolute; 22 | font-weight: bold; 23 | right: 0%; 24 | top: 0; 25 | height: 100%; 26 | z-index: 1; 27 | } 28 | 29 | svg { 30 | z-index: 2; 31 | } 32 | 33 | .value { 34 | position: absolute; 35 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/secure-score-chart/bar-diagram/bar-diagram.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 | {{ value.value }} 6 |
7 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/secure-score-chart/doughnut-diagram/doughnut-diagram.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | align-items: center; 4 | } 5 | 6 | .secure-score-diagram-container { 7 | display: flex; 8 | justify-content: space-around; 9 | align-items: center; 10 | } 11 | 12 | .dashboard-diagram-container { 13 | display: flex; 14 | justify-content: space-between; 15 | align-items: center; 16 | } 17 | 18 | .info { 19 | display: flex; 20 | flex-direction: column; 21 | } 22 | 23 | .top { 24 | display: flex; 25 | justify-content: center; 26 | font-size: 18px; 27 | font-weight: bold; 28 | } 29 | 30 | .top>div { 31 | display: flex; 32 | justify-content: center; 33 | margin: 0 20px; 34 | } 35 | 36 | .bottom { 37 | display: flex; 38 | justify-content: center; 39 | font-size: 40px; 40 | color: rgba(0, 0, 0, 0.8); 41 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/secure-score-chart/doughnut-diagram/doughnut-diagram.component.html: -------------------------------------------------------------------------------- 1 |
3 | 6 | 7 |
8 |
9 |
10 | Current
Score
11 |
12 |
13 | Max
Score
14 |
15 |
16 |
{{ doughnutData.currentScore }} / {{ doughnutData.maxScore }}
17 |
18 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/secure-score-chart/secure-score-chart.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | Secure score 4 | 5 | 6 |
7 |
8 | Compare your score 9 | 10 |
11 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/secure-score-chart/secure-score-chart.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { AverageComparativeScore, SecureScore } from 'src/app/models/graph'; 3 | 4 | @Component({ 5 | selector: 'app-secure-score-chart', 6 | templateUrl: './secure-score-chart.component.html', 7 | styleUrls: ['./secure-score-chart.component.css'], 8 | }) 9 | export class SecureScoreChartComponent { 10 | @Input() public barData: AverageComparativeScore[]; 11 | @Input() public doughnutData: SecureScore; 12 | @Input() public isSecureScore: boolean; 13 | @Input() public isDashboard: boolean; 14 | } 15 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/severity-level/severity-level.component.css: -------------------------------------------------------------------------------- 1 | .severity-level { 2 | height: 100%; 3 | display: flex; 4 | justify-content: space-between; 5 | align-items: center; 6 | flex-shrink: 0; 7 | } 8 | 9 | .severity-level.small { 10 | width: 22px; 11 | } 12 | 13 | .severity-level.large { 14 | width: 44px; 15 | } 16 | 17 | .severity-level>div { 18 | background: lightgray; 19 | } 20 | 21 | .severity-level.small>div { 22 | width: 6px; 23 | height: 6px; 24 | } 25 | 26 | .severity-level.large>div { 27 | width: 12px; 28 | height: 12px; 29 | } 30 | 31 | .severity-level.high>div { 32 | background: #C00000; 33 | } 34 | 35 | .severity-level.medium>div:nth-child(1), 36 | .severity-level.medium>div:nth-child(2) { 37 | background: #F2994A; 38 | } 39 | 40 | .severity-level.low>div:first-child { 41 | background: #FFC700; 42 | } 43 | 44 | .severity-level.informational>div { 45 | background: lightgray; 46 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/severity-level/severity-level.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/severity-level/severity-level.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-severity-level', 5 | templateUrl: './severity-level.component.html', 6 | styleUrls: ['./severity-level.component.css'] 7 | }) 8 | export class SeverityLevelComponent { 9 | @Input() level: 'low' | 'medium' | 'high' | 'informational'; 10 | @Input() size: 'large' | 'small' = 'small'; 11 | } 12 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/user-logo/user-logo.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | justify-content: center; 4 | align-items: center; 5 | flex-shrink: 0; 6 | overflow: hidden; 7 | border-radius: 999px; 8 | font-family: SegoeUI; 9 | font-size: 12px; 10 | color: white; 11 | background: #2D9CDB; 12 | text-transform: uppercase; 13 | } 14 | 15 | .initials { 16 | display: flex; 17 | justify-content: center; 18 | align-items: center; 19 | } 20 | 21 | :host>img { 22 | width: 100%; 23 | height: 100%; 24 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/user-logo/user-logo.component.html: -------------------------------------------------------------------------------- 1 |
2 | {{ getInitials() }} 3 |
4 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/common/user-panel/user-panel.component.html: -------------------------------------------------------------------------------- 1 |
2 | My account 3 |
4 | 5 | 8 | 9 |
10 |
11 | 12 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/dynamic-form/components/dynamic-form-control/dynamic-form-control.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/dynamic-form/components/dynamic-form-control/dynamic-form-control.component.css -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/dynamic-form/components/dynamic-form-control/dynamic-form-control.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 5 | 6 | 7 | 9 | 10 | 11 | 13 | 14 | 15 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/dynamic-form/components/dynamic-form-control/dynamic-form-control.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { FormGroup } from '@angular/forms'; 3 | // models 4 | import { ControlBase, ControlType } from '../../models'; 5 | 6 | @Component({ 7 | selector: 'app-dynamic-form-control', 8 | templateUrl: './dynamic-form-control.component.html' 9 | }) 10 | export class DynamicFormControlComponent { 11 | @Input() control: ControlBase; 12 | @Input() form: FormGroup; 13 | public controlType = ControlType; 14 | 15 | get isValid() { return this.form.controls[this.control.key].valid; } 16 | } 17 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/dynamic-form/components/dynamic-form/dynamic-form.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | width: 343px; 4 | height: 100%; 5 | background: white; 6 | flex-grow: 0; 7 | flex-shrink: 0; 8 | } 9 | 10 | :host>form { 11 | margin: 22px; 12 | display: flex; 13 | flex-direction: column; 14 | width: calc(100% - 44px); 15 | } 16 | 17 | :host>form>.form-field:not(:last-child) { 18 | margin-bottom: 10px; 19 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/dynamic-form/components/dynamic-form/dynamic-form.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/dynamic-form/dynamic-form.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 4 | // common components 5 | import { CommonComponentsModule } from '../common/common-components.module'; 6 | // models 7 | // components 8 | import { DynamicFormControlComponent } from './components/dynamic-form-control/dynamic-form-control.component'; 9 | import { DynamicFormComponent } from './components/dynamic-form/dynamic-form.component'; 10 | 11 | const components = [ 12 | DynamicFormControlComponent, 13 | DynamicFormComponent 14 | ]; 15 | 16 | @NgModule({ 17 | imports: [ 18 | FormsModule, 19 | ReactiveFormsModule, 20 | CommonModule, 21 | CommonComponentsModule, 22 | ], 23 | declarations: components, 24 | exports: components 25 | }) 26 | 27 | export class DynamicFormModule { } 28 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/dynamic-form/models/dropdown-control.model.ts: -------------------------------------------------------------------------------- 1 | import { ControlBase, BaseControlOptions, ControlType, DropdownFilterOptions } from '.'; 2 | 3 | export class DropdownControl extends ControlBase { 4 | controlType = ControlType.DropDown; 5 | options: T[] = []; 6 | 7 | constructor(options: DropdownFilterOptions = {}) { 8 | super(options); 9 | this.options = options.options || []; 10 | } 11 | } 12 | 13 | export interface DropdownFilterOptions extends BaseControlOptions { 14 | options?: T[]; 15 | } 16 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/dynamic-form/models/horizontal-textfield-filter.model.ts: -------------------------------------------------------------------------------- 1 | import { ControlBase, ControlType, BaseControlOptions } from '.'; 2 | 3 | export class HorizontalTextfieldControl extends ControlBase { 4 | controlType = ControlType.HorizontalTextField; 5 | type: string; 6 | 7 | constructor(options: BaseControlOptions = {}) { 8 | super(options); 9 | this.type = options['type'] || ''; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/dynamic-form/models/index.ts: -------------------------------------------------------------------------------- 1 | export { ControlBase, ControlType, BaseControlOptions } from './control-base.model'; 2 | export { HorizontalTextfieldControl } from './horizontal-textfield-filter.model'; 3 | export { VerticalTextfieldControl } from './vertical-textfield-filter.model'; 4 | export { DropdownControl, DropdownFilterOptions } from './dropdown-control.model'; 5 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/dynamic-form/models/vertical-textfield-filter.model.ts: -------------------------------------------------------------------------------- 1 | import { ControlBase, ControlType, BaseControlOptions } from '.'; 2 | 3 | export class VerticalTextfieldControl extends ControlBase { 4 | controlType = ControlType.VerticalTextField; 5 | type: string; 6 | 7 | constructor(options: BaseControlOptions = {}) { 8 | super(options); 9 | this.type = options['type'] || ''; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/dynamic-form/services/dynamic-form-control.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { FormControl, FormGroup, Validators, AbstractControl } from '@angular/forms'; 3 | // models 4 | import { ControlBase } from '../models'; 5 | 6 | @Injectable() 7 | export class DynamicFormControlService { 8 | constructor() { } 9 | 10 | toFormGroup(controls: ControlBase[]) { 11 | const group: { [key: string]: AbstractControl } = {}; 12 | 13 | controls.forEach(control => { 14 | group[control.key] = control.required ? new FormControl(control.value || '', Validators.required) 15 | : new FormControl(control.value || ''); 16 | }); 17 | 18 | return new FormGroup(group); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/actions/action-list/action-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | overflow-y: hidden; 5 | } 6 | 7 | .list-header { 8 | display: flex; 9 | border-bottom: 1px solid #E9E9E9; 10 | height: 30px; 11 | flex-shrink: 0; 12 | } 13 | 14 | .list-header>.column { 15 | display: flex; 16 | justify-content: flex-start; 17 | align-items: center; 18 | font-family: SegoeUI; 19 | font-size: 12px; 20 | height: 30px; 21 | color: rgba(0, 0, 0, 0.6); 22 | margin-right: 10px; 23 | } 24 | 25 | .list-header>.column:first-child { 26 | padding-left: 13px; 27 | } 28 | 29 | .actions { 30 | display: flex; 31 | justify-content: center; 32 | align-items: center; 33 | margin: 0 10px; 34 | width: 15px; 35 | flex-shrink: 0; 36 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/actions/action-list/action-list.component.html: -------------------------------------------------------------------------------- 1 |
2 |
Target
3 |
Type
4 |
Submitted
5 |
Reason / Alert ID
6 |
Provider
7 |
Status
8 |
Status Updated
9 |
10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/actions/actions.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | flex-grow: 1; 3 | display: flex; 4 | flex-direction: row; 5 | overflow: hidden; 6 | } 7 | 8 | .page-content { 9 | display: flex; 10 | overflow: hidden; 11 | flex-direction: column; 12 | flex-grow: 1; 13 | margin-right: 10px; 14 | box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.25); 15 | } 16 | 17 | .actions { 18 | flex-grow: 1; 19 | display: flex; 20 | flex-direction: column; 21 | overflow: hidden; 22 | } 23 | 24 | .header-title { 25 | font-family: SegoeUI; 26 | font-size: 20px; 27 | color: #2D2D2D; 28 | margin-top: 7px; 29 | text-transform: capitalize; 30 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/actions/actions.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
{{ title }}
4 | 5 |
6 |
7 | 8 |
9 |
10 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/actions/invoke-action-form/invoke-action-form.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | z-index: 2; 3 | position: fixed; 4 | top: 0px; 5 | right: 0px; 6 | bottom: 0px; 7 | left: 0px; 8 | display: flex; 9 | justify-content: center; 10 | align-items: center; 11 | } 12 | 13 | .background { 14 | position: absolute; 15 | width: 100%; 16 | height: 100%; 17 | background: rgba(0, 0, 0, 0.7); 18 | } 19 | 20 | .form-container { 21 | flex-grow: 0; 22 | flex-shrink: 0; 23 | z-index: 1; 24 | width: 340px; 25 | position: relative; 26 | } 27 | 28 | .form-container>svg { 29 | position: absolute; 30 | top: 15px; 31 | right: 15px; 32 | cursor: pointer; 33 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/actions/invoke-action-form/invoke-action-form.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 7 | 8 | 9 | 10 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/boolean-clickable-property/boolean-clickable-property.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | overflow: hidden; 5 | } 6 | 7 | .title { 8 | font-family: SegoeUI; 9 | font-size: 12px; 10 | font-weight: bolder; 11 | color: rgba(0, 0, 0, 0.6); 12 | margin-bottom: 5px; 13 | } 14 | 15 | .value { 16 | font-family: SegoeUI; 17 | font-size: 14px; 18 | color: rgba(0, 0, 0, 0.6); 19 | } 20 | 21 | .value.clickable { 22 | color: #0078D7; 23 | cursor: pointer; 24 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/boolean-clickable-property/boolean-clickable-property.component.html: -------------------------------------------------------------------------------- 1 |
{{ title }}
2 |
3 | {{ value | boolean }}
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/boolean-pipe/boolean.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | @Pipe({ name: 'boolean' }) 4 | export class BooleanPipe implements PipeTransform { 5 | transform(value: boolean): string { 6 | return typeof value === 'boolean' 7 | ? value === true 8 | ? 'Yes' 9 | : 'No' 10 | : 'No data'; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/clickable-property/clickable-property.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | overflow: hidden; 5 | } 6 | 7 | .title { 8 | font-family: SegoeUI; 9 | font-size: 12px; 10 | font-weight: bolder; 11 | color: rgba(0, 0, 0, 0.6); 12 | margin-bottom: 5px; 13 | } 14 | 15 | .value { 16 | font-family: SegoeUI; 17 | font-size: 14px; 18 | color: rgba(0, 0, 0, 0.6); 19 | } 20 | 21 | .value:not(.untouched) { 22 | overflow: hidden; 23 | white-space: nowrap; 24 | text-overflow: ellipsis; 25 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/clickable-property/clickable-property.component.html: -------------------------------------------------------------------------------- 1 |
{{ title }}
2 |
4 | {{ value || 'No data' }}
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/datetime-clickable-property/datetime-clickable-property.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | overflow: hidden; 5 | } 6 | 7 | .title { 8 | font-family: SegoeUI; 9 | font-size: 12px; 10 | font-weight: bolder; 11 | color: rgba(0, 0, 0, 0.6); 12 | margin-bottom: 5px; 13 | } 14 | 15 | .value { 16 | font-family: SegoeUI; 17 | font-size: 14px; 18 | color: rgba(0, 0, 0, 0.6); 19 | overflow: hidden; 20 | white-space: nowrap; 21 | text-overflow: ellipsis; 22 | } 23 | 24 | .value.clickable { 25 | color: #0078D7; 26 | cursor: pointer; 27 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/datetime-clickable-property/datetime-clickable-property.component.html: -------------------------------------------------------------------------------- 1 |
{{ title }}
2 |
3 | {{ (value | date : 'M/d/yyyy, h:mm a') || 'No data' }}
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/host-clickable-property/host-clickable-property.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | overflow: hidden; 5 | } 6 | 7 | .title { 8 | font-family: SegoeUI; 9 | font-size: 12px; 10 | font-weight: bolder; 11 | color: rgba(0, 0, 0, 0.6); 12 | margin-bottom: 5px; 13 | } 14 | 15 | .value { 16 | display: flex; 17 | align-items: center; 18 | font-family: SegoeUI; 19 | font-size: 14px; 20 | color: rgba(0, 0, 0, 0.6); 21 | } 22 | 23 | .value.clickable { 24 | color: #0078D7; 25 | cursor: pointer; 26 | } 27 | 28 | .value>svg { 29 | flex-shrink: 0; 30 | margin-right: 5px; 31 | } 32 | 33 | .value>div { 34 | overflow: hidden; 35 | white-space: nowrap; 36 | text-overflow: ellipsis; 37 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/radio-clickable-property/radio-clickable-property.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | overflow: hidden; 5 | } 6 | 7 | .title { 8 | font-family: SegoeUI; 9 | font-size: 12px; 10 | font-weight: bolder; 11 | color: rgba(0, 0, 0, 0.6); 12 | margin-bottom: 5px; 13 | } 14 | 15 | .value { 16 | display: flex; 17 | align-items: center; 18 | font-family: SegoeUI; 19 | font-size: 14px; 20 | color: rgba(0, 0, 0, 0.6); 21 | } 22 | 23 | .value.clickable { 24 | color: #0078D7; 25 | cursor: pointer; 26 | } 27 | .value>div { 28 | overflow: hidden; 29 | white-space: nowrap; 30 | text-overflow: ellipsis; 31 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/radio-clickable-property/radio-clickable-property.component.html: -------------------------------------------------------------------------------- 1 |
{{ title }}
2 |
3 | 4 |
5 | {{ value || 'No data' }}
6 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/user-clickable-property/user-clickable-property.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | overflow: hidden; 5 | } 6 | 7 | .title { 8 | font-family: SegoeUI; 9 | font-size: 12px; 10 | font-weight: bolder; 11 | color: rgba(0, 0, 0, 0.6); 12 | margin-bottom: 2px; 13 | } 14 | 15 | .value { 16 | display: flex; 17 | align-items: center; 18 | font-family: SegoeUI; 19 | font-size: 14px; 20 | color: rgba(0, 0, 0, 0.6); 21 | } 22 | 23 | .value.clickable { 24 | color: #0078D7; 25 | cursor: pointer; 26 | } 27 | 28 | .value>app-user-logo { 29 | margin-right: 5px; 30 | } 31 | 32 | .value>div { 33 | overflow: hidden; 34 | white-space: nowrap; 35 | text-overflow: ellipsis; 36 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/common/user-clickable-property/user-clickable-property.component.html: -------------------------------------------------------------------------------- 1 |
{{ title }}
2 |
3 | 4 |
5 | {{ getDisplayValue() || 'No data' }}
6 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/activity-history/activity-history-item/activity-history-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | // models 3 | import { AlertHistoryState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-activity-history-item', 7 | templateUrl: './activity-history-item.component.html', 8 | styleUrls: ['./activity-history-item.component.css'] 9 | }) 10 | export class ActivityHistoryItemComponent { 11 | @Input() item: AlertHistoryState; 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/activity-history/activity-history.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | } 4 | 5 | :host app-activity-history-item:not(:last-child) { 6 | margin-bottom: 15px; 7 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/activity-history/activity-history.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/activity-history/activity-history.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | // models 3 | import { AlertHistoryState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-activity-history', 7 | templateUrl: './activity-history.component.html', 8 | styleUrls: ['./activity-history.component.css'] 9 | }) 10 | export class ActivityHistoryComponent { 11 | public title = 'Activity History'; 12 | @Input() isExpanded = true; 13 | @Input() items: AlertHistoryState[]; 14 | } 15 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/cloud-app-state-list/cloud-app-state-item/cloud-app-state-item.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | height: 60px; 4 | } 5 | 6 | :host(:nth-child(even)) { 7 | background: #F6F6F6; 8 | } 9 | 10 | :host>.column { 11 | display: flex; 12 | justify-content: flex-start; 13 | align-items: center; 14 | flex: 1; 15 | font-family: SegoeUI; 16 | font-size: 14px; 17 | color: rgba(0, 0, 0, 0.6); 18 | text-transform: capitalize; 19 | overflow: hidden; 20 | word-break: break-word; 21 | margin-right: 10px; 22 | } 23 | 24 | :host>.column:first-child { 25 | padding-left: 13px; 26 | color: black; 27 | } 28 | 29 | .severity-wrapper { 30 | display: flex; 31 | justify-content: flex-start; 32 | align-items: center; 33 | } 34 | 35 | .severity-wrapper>div:nth-child(2) { 36 | text-transform: capitalize; 37 | margin-left: 10px; 38 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/cloud-app-state-list/cloud-app-state-item/cloud-app-state-item.component.html: -------------------------------------------------------------------------------- 1 |
3 | {{ item.destinationServiceName || 'No Data' }} 4 |
5 |
7 | {{ item.destinationServiceIp || 'No Data' }} 8 |
9 |
11 | {{ item.riskScore || 'No Data' }} 12 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/cloud-app-state-list/cloud-app-state-item/cloud-app-state-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { CloudAppSecurityState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-cloud-app-state-item', 7 | templateUrl: './cloud-app-state-item.component.html', 8 | styleUrls: ['./cloud-app-state-item.component.css'] 9 | }) 10 | export class CloudAppStateItemComponent { 11 | @Input() public item: CloudAppSecurityState; 12 | @Output() public valueClick: EventEmitter<{ key: string, value: string }>; 13 | 14 | constructor() { 15 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 16 | } 17 | 18 | public onValueClick(key: string, value: string): void { 19 | if (value) { 20 | this.valueClick.emit({ key, value }); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/cloud-app-state-list/cloud-app-state-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | } 5 | 6 | .list-header { 7 | display: flex; 8 | border-bottom: 1px solid #E9E9E9; 9 | height: 30px; 10 | flex-shrink: 0; 11 | } 12 | 13 | .list-header>.column { 14 | display: flex; 15 | flex: 1; 16 | justify-content: flex-start; 17 | align-items: center; 18 | font-family: SegoeUI; 19 | font-size: 12px; 20 | height: 30px; 21 | color: rgba(0, 0, 0, 0.6); 22 | margin-right: 10px; 23 | } 24 | 25 | .list-header>.column:first-child { 26 | padding-left: 13px; 27 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/cloud-app-state-list/cloud-app-state-list.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
Destination Service Name
4 |
Destination Service IP
5 |
Risk Score
6 |
7 | 8 | 9 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/cloud-app-state-list/cloud-app-state-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { CloudAppSecurityState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-cloud-app-state-list', 7 | templateUrl: './cloud-app-state-list.component.html', 8 | styleUrls: ['./cloud-app-state-list.component.css'] 9 | }) 10 | export class CloudAppStateListComponent { 11 | public title = 'Cloud Application States'; 12 | @Input() isExpanded = true; 13 | @Input() items: CloudAppSecurityState[]; 14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 15 | 16 | constructor() { 17 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 18 | } 19 | 20 | public onValueClick(filterValue: { key: string, value: string }): void { 21 | if (filterValue.value) { 22 | this.valueClick.emit(filterValue); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/file-list/file-list-item/file-list-item.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | height: 60px; 4 | } 5 | 6 | :host(:nth-child(even)) { 7 | background: #F6F6F6; 8 | } 9 | 10 | :host>.column { 11 | display: flex; 12 | justify-content: flex-start; 13 | align-items: center; 14 | font-family: SegoeUI; 15 | font-size: 14px; 16 | color: rgba(0, 0, 0, 0.6); 17 | text-transform: capitalize; 18 | overflow: hidden; 19 | word-break: break-word; 20 | margin-right: 10px; 21 | } 22 | 23 | :host>.column:first-child { 24 | padding-left: 13px; 25 | color: black; 26 | } 27 | 28 | .severity-wrapper { 29 | display: flex; 30 | justify-content: flex-start; 31 | align-items: center; 32 | } 33 | 34 | .severity-wrapper>div:nth-child(2) { 35 | text-transform: capitalize; 36 | margin-left: 10px; 37 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/file-list/file-list-item/file-list-item.component.html: -------------------------------------------------------------------------------- 1 |
3 | {{ item.name || 'No Data' }} 4 |
5 |
{{ item.path || 'No Data' }}
7 |
{{ item.riskScore || 'No Data' }}
9 |
{{ item.fileHash?.hashType || 'No Data' }}
10 |
{{ item.fileHash?.hashValue || 'No Data' }}
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/file-list/file-list-item/file-list-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core'; 2 | // models 3 | import { FileSecurityState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-file-list-item', 7 | templateUrl: './file-list-item.component.html', 8 | styleUrls: ['./file-list-item.component.css'] 9 | }) 10 | export class FileListItemComponent { 11 | @Input() public item: FileSecurityState; 12 | @Output() public valueClick: EventEmitter<{ key: string, value: string }>; 13 | 14 | constructor() { 15 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 16 | } 17 | 18 | public onValueClick(key: string, value: string): void { 19 | if (value) { 20 | this.valueClick.emit({ key, value }); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/file-list/file-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | } 5 | 6 | .list-header { 7 | display: flex; 8 | border-bottom: 1px solid #E9E9E9; 9 | height: 30px; 10 | flex-shrink: 0; 11 | } 12 | 13 | .list-header>.column { 14 | display: flex; 15 | justify-content: flex-start; 16 | align-items: center; 17 | font-family: SegoeUI; 18 | font-size: 12px; 19 | height: 30px; 20 | color: rgba(0, 0, 0, 0.6); 21 | margin-right: 10px; 22 | } 23 | 24 | .list-header>.column:first-child { 25 | padding-left: 13px; 26 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/file-list/file-list.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
Name
4 |
Path
5 |
Risk score
6 |
Hash Type
7 |
Hash Value
8 |
9 | 10 | 11 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/file-list/file-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { FileSecurityState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-file-list', 7 | templateUrl: './file-list.component.html', 8 | styleUrls: ['./file-list.component.css'] 9 | }) 10 | export class FileListComponent { 11 | public title = 'Files'; 12 | @Input() isExpanded = true; 13 | @Input() items: FileSecurityState[]; 14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 15 | 16 | constructor() { 17 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 18 | } 19 | 20 | public onValueClick(filterValue: { key: string, value: string }): void { 21 | if (filterValue.value) { 22 | this.valueClick.emit(filterValue); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/host-list/host-item/host-item.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-grow: 1; 4 | } 5 | 6 | :host(:nth-child(even)) { 7 | background: #F6F6F6; 8 | } 9 | 10 | .column { 11 | display: flex; 12 | flex-direction: column; 13 | flex: 1; 14 | overflow: hidden; 15 | padding: 10px; 16 | } 17 | 18 | .column:not(:last-child) { 19 | margin-right: 10px; 20 | } 21 | 22 | .column>*:not(:last-child) { 23 | margin-bottom: 15px; 24 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/host-list/host-item/host-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { HostSecurityState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-host-item', 7 | templateUrl: './host-item.component.html', 8 | styleUrls: ['./host-item.component.css'] 9 | }) 10 | export class HostItemComponent { 11 | @Input() host: HostSecurityState; 12 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 13 | 14 | constructor() { 15 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 16 | } 17 | 18 | public onValueClick(filterValue: { key: string, value: string }): void { 19 | if (filterValue.value) { 20 | this.valueClick.emit(filterValue); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/host-list/host-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | } 4 | 5 | :host app-user-item:not(:last-child) { 6 | padding-bottom: 10px; 7 | border-bottom: 1px solid #E9E9E9; 8 | margin-bottom: 10px; 9 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/host-list/host-list.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/host-list/host-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { HostSecurityState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-host-list', 7 | templateUrl: './host-list.component.html', 8 | styleUrls: ['./host-list.component.css'] 9 | }) 10 | export class HostListComponent { 11 | public title = 'Hosts'; 12 | @Input() isExpanded = true; 13 | @Input() hosts: HostSecurityState[]; 14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 15 | 16 | constructor() { 17 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 18 | } 19 | 20 | public onValueClick(filterValue: { key: string, value: string }): void { 21 | if (filterValue.value) { 22 | this.valueClick.emit(filterValue); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/malware-state-list/malware-state-item/malware-state-item.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-grow: 1; 4 | } 5 | 6 | :host(:nth-child(even)) { 7 | background: #F6F6F6; 8 | } 9 | 10 | .column { 11 | display: flex; 12 | flex-direction: column; 13 | flex: 1; 14 | overflow: hidden; 15 | padding: 10px; 16 | } 17 | 18 | .column:not(:last-child) { 19 | margin-right: 10px; 20 | } 21 | 22 | .column>*:not(:last-child) { 23 | margin-bottom: 15px; 24 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/malware-state-list/malware-state-item/malware-state-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { MalwareState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-malware-state-item', 7 | templateUrl: './malware-state-item.component.html', 8 | styleUrls: ['./malware-state-item.component.css'] 9 | }) 10 | export class MalwareStateItemComponent { 11 | @Input() item: MalwareState; 12 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 13 | 14 | constructor() { 15 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 16 | } 17 | 18 | public onValueClick(filterValue: { key: string, value: string }): void { 19 | if (filterValue.value) { 20 | this.valueClick.emit(filterValue); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/malware-state-list/malware-state-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | } 4 | 5 | :host app-user-item:not(:last-child) { 6 | padding-bottom: 10px; 7 | border-bottom: 1px solid #E9E9E9; 8 | margin-bottom: 10px; 9 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/malware-state-list/malware-state-list.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/malware-state-list/malware-state-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { MalwareState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-malware-state-list', 7 | templateUrl: './malware-state-list.component.html', 8 | styleUrls: ['./malware-state-list.component.css'] 9 | }) 10 | export class MalwareStateListComponent { 11 | public title = 'Malware States'; 12 | @Input() isExpanded = true; 13 | @Input() items: MalwareState[]; 14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 15 | 16 | constructor() { 17 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 18 | } 19 | 20 | public onValueClick(filterValue: { key: string, value: string }): void { 21 | if (filterValue.value) { 22 | this.valueClick.emit(filterValue); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/network-connection-list/network-connection-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | } 4 | 5 | :host app-user-item:not(:last-child) { 6 | padding-bottom: 10px; 7 | border-bottom: 1px solid #E9E9E9; 8 | margin-bottom: 10px; 9 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/network-connection-list/network-connection-list.component.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/process-list/process-item/process-item.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-grow: 1; 4 | } 5 | 6 | :host(:nth-child(even)) { 7 | background: #F6F6F6; 8 | } 9 | 10 | .column { 11 | display: flex; 12 | flex-direction: column; 13 | flex: 1; 14 | overflow: hidden; 15 | padding: 10px; 16 | } 17 | 18 | .column:not(:last-child) { 19 | margin-right: 10px; 20 | } 21 | 22 | .column>*:not(:last-child) { 23 | margin-bottom: 15px; 24 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/process-list/process-item/process-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { Process } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-process-item', 7 | templateUrl: './process-item.component.html', 8 | styleUrls: ['./process-item.component.css'] 9 | }) 10 | export class ProcessItemComponent { 11 | @Input() item: Process; 12 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 13 | 14 | constructor() { 15 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 16 | } 17 | 18 | public onValueClick(filterValue: { key: string, value: string }): void { 19 | if (filterValue.value) { 20 | this.valueClick.emit(filterValue); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/process-list/process-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | } 4 | 5 | :host app-user-item:not(:last-child) { 6 | padding-bottom: 10px; 7 | border-bottom: 1px solid #E9E9E9; 8 | margin-bottom: 10px; 9 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/process-list/process-list.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/process-list/process-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { Process } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-process-list', 7 | templateUrl: './process-list.component.html', 8 | styleUrls: ['./process-list.component.css'] 9 | }) 10 | export class ProcessListComponent { 11 | public title = 'Processes'; 12 | @Input() isExpanded = true; 13 | @Input() items: Process[]; 14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 15 | 16 | constructor() { 17 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 18 | } 19 | 20 | public onValueClick(filterValue: { key: string, value: string }): void { 21 | if (filterValue.value) { 22 | this.valueClick.emit(filterValue); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/registry-key-update-list/registry-key-update-item/registry-key-update-item.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-grow: 1; 4 | } 5 | 6 | :host(:nth-child(even)) { 7 | background: #F6F6F6; 8 | } 9 | 10 | .column { 11 | display: flex; 12 | flex-direction: column; 13 | flex: 1; 14 | overflow: hidden; 15 | padding: 10px; 16 | } 17 | 18 | .column:not(:last-child) { 19 | margin-right: 10px; 20 | } 21 | 22 | .column>*:not(:last-child) { 23 | margin-bottom: 15px; 24 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/registry-key-update-list/registry-key-update-item/registry-key-update-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { RegistryKeyState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-registry-key-update-item', 7 | templateUrl: './registry-key-update-item.component.html', 8 | styleUrls: ['./registry-key-update-item.component.css'] 9 | }) 10 | export class RegistryKeyUpdateItemComponent { 11 | @Input() item: RegistryKeyState; 12 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 13 | 14 | constructor() { 15 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 16 | } 17 | 18 | public onValueClick(filterValue: { key: string, value: string }): void { 19 | if (filterValue.value) { 20 | this.valueClick.emit(filterValue); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/registry-key-update-list/registry-key-update-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | } 4 | 5 | :host app-user-item:not(:last-child) { 6 | padding-bottom: 10px; 7 | border-bottom: 1px solid #E9E9E9; 8 | margin-bottom: 10px; 9 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/registry-key-update-list/registry-key-update-list.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/registry-key-update-list/registry-key-update-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { RegistryKeyState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-registry-key-update-list', 7 | templateUrl: './registry-key-update-list.component.html', 8 | styleUrls: ['./registry-key-update-list.component.css'] 9 | }) 10 | export class RegistryKeyUpdateListComponent { 11 | public title = 'Registry Key Updates'; 12 | @Input() isExpanded = true; 13 | @Input() items: RegistryKeyState[]; 14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 15 | 16 | constructor() { 17 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 18 | } 19 | 20 | public onValueClick(filterValue: { key: string, value: string }): void { 21 | if (filterValue.value) { 22 | this.valueClick.emit(filterValue); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/string-list/string-list.component.css: -------------------------------------------------------------------------------- 1 | .value { 2 | display: flex; 3 | align-items: center; 4 | font-family: SegoeUI; 5 | font-size: 14px; 6 | color: rgba(0, 0, 0, 0.6); 7 | height: 40px; 8 | padding: 0 15px; 9 | } 10 | 11 | .value:nth-child(even) { 12 | background: #F6F6F6; 13 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/string-list/string-list.component.html: -------------------------------------------------------------------------------- 1 | 2 |
4 | {{ item }} 5 |
6 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/string-list/string-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-alert-string-list', 5 | templateUrl: './string-list.component.html', 6 | styleUrls: ['./string-list.component.css'] 7 | }) 8 | export class StringListComponent { 9 | @Input() title: string; 10 | @Input() isExpanded = true; 11 | @Input() items: string[]; 12 | @Input() filterKey: string; 13 | @Input() clickable = true; 14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 15 | 16 | constructor() { 17 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 18 | } 19 | 20 | public onValueClick(value: string): void { 21 | if (this.clickable && this.filterKey && value) { 22 | this.valueClick.emit({ 23 | key: this.filterKey, 24 | value 25 | }); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/trigger-list/trigger-item/trigger-item.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | height: 60px; 4 | } 5 | 6 | :host(:nth-child(even)) { 7 | background: #F6F6F6; 8 | } 9 | 10 | :host>.column { 11 | display: flex; 12 | justify-content: flex-start; 13 | align-items: center; 14 | font-family: SegoeUI; 15 | font-size: 14px; 16 | color: rgba(0, 0, 0, 0.6); 17 | text-transform: capitalize; 18 | overflow: hidden; 19 | word-break: break-word; 20 | margin-right: 10px; 21 | } 22 | 23 | :host>.column:first-child { 24 | padding-left: 13px; 25 | color: black; 26 | } 27 | 28 | .severity-wrapper { 29 | display: flex; 30 | justify-content: flex-start; 31 | align-items: center; 32 | } 33 | 34 | .severity-wrapper>div:nth-child(2) { 35 | text-transform: capitalize; 36 | margin-left: 10px; 37 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/trigger-list/trigger-item/trigger-item.component.html: -------------------------------------------------------------------------------- 1 |
3 | {{ item.name || 'No Data' }} 4 |
5 |
7 | {{ item.type || 'No Data' }} 8 |
9 |
11 | {{ item.value || 'No Data' }} 12 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/trigger-list/trigger-item/trigger-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { Trigger } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-trigger-item', 7 | templateUrl: './trigger-item.component.html', 8 | styleUrls: ['./trigger-item.component.css'] 9 | }) 10 | export class TriggerListItemComponent { 11 | @Input() public item: Trigger; 12 | @Output() public valueClick: EventEmitter<{ key: string, value: string }>; 13 | 14 | constructor() { 15 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 16 | } 17 | 18 | public onValueClick(key: string, value: string): void { 19 | if (value) { 20 | this.valueClick.emit({ key, value }); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/trigger-list/trigger-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | } 5 | 6 | .list-header { 7 | display: flex; 8 | border-bottom: 1px solid #E9E9E9; 9 | height: 30px; 10 | flex-shrink: 0; 11 | } 12 | 13 | .list-header>.column { 14 | display: flex; 15 | justify-content: flex-start; 16 | align-items: center; 17 | font-family: SegoeUI; 18 | font-size: 12px; 19 | height: 30px; 20 | color: rgba(0, 0, 0, 0.6); 21 | margin-right: 10px; 22 | } 23 | 24 | .list-header>.column:first-child { 25 | padding-left: 13px; 26 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/trigger-list/trigger-list.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
Name
4 |
Type
5 |
Value
6 |
7 | 8 | 9 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/trigger-list/trigger-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { Trigger } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-trigger-list', 7 | templateUrl: './trigger-list.component.html', 8 | styleUrls: ['./trigger-list.component.css'] 9 | }) 10 | export class TriggerListComponent { 11 | public title = 'Triggers'; 12 | @Input() isExpanded = true; 13 | @Input() items: Trigger[]; 14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 15 | 16 | constructor() { 17 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 18 | } 19 | 20 | public onValueClick(filterValue: { key: string, value: string }): void { 21 | if (filterValue.value) { 22 | this.valueClick.emit(filterValue); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/url-list/url-list.component.css: -------------------------------------------------------------------------------- 1 | .url { 2 | display: flex; 3 | align-items: center; 4 | font-family: SegoeUI; 5 | font-size: 14px; 6 | color: rgba(0, 0, 0, 0.6); 7 | height: 40px; 8 | padding: 0 15px; 9 | overflow: hidden; 10 | } 11 | 12 | .url:nth-child(even) { 13 | background: #F6F6F6; 14 | } 15 | 16 | .url>div { 17 | overflow: hidden; 18 | white-space: nowrap; 19 | text-overflow: ellipsis; 20 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/url-list/url-list.component.html: -------------------------------------------------------------------------------- 1 | 2 |
4 |
{{ item }}
5 |
6 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/url-list/url-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import * as isUrl from 'is-url'; 3 | 4 | @Component({ 5 | selector: 'app-url-list', 6 | templateUrl: './url-list.component.html', 7 | styleUrls: ['./url-list.component.css'] 8 | }) 9 | export class UrlListComponent { 10 | @Input() title: string; 11 | @Input() isExpanded = true; 12 | @Input() items: string[]; 13 | 14 | public isUrl(value: string): boolean { 15 | return isUrl(value); 16 | } 17 | 18 | public onUrlClick(value: string): void { 19 | // tslint:disable-next-line:no-unused-expression 20 | value && window.open(value, '_blank'); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/user-list/user-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | } 4 | 5 | :host app-user-item:not(:last-child) { 6 | padding-bottom: 10px; 7 | border-bottom: 1px solid #E9E9E9; 8 | margin-bottom: 10px; 9 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/user-list/user-list.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/user-list/user-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { User } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-user-list', 7 | templateUrl: './user-list.component.html', 8 | styleUrls: ['./user-list.component.css'] 9 | }) 10 | export class UserListComponent { 11 | public title = 'User Accounts/Devices'; 12 | @Input() isExpanded = true; 13 | @Input() users: User[]; 14 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 15 | 16 | constructor() { 17 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 18 | } 19 | 20 | public onValueClick(filterValue: { key: string, value: string }): void { 21 | if (filterValue.value) { 22 | this.valueClick.emit(filterValue); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/vulnerability-state-list/vulnerability-state-item/vulnerability-state-item.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | height: 60px; 4 | } 5 | 6 | :host(:nth-child(even)) { 7 | background: #F6F6F6; 8 | } 9 | 10 | :host>.column { 11 | display: flex; 12 | justify-content: flex-start; 13 | align-items: center; 14 | flex: 1; 15 | font-family: SegoeUI; 16 | font-size: 14px; 17 | color: rgba(0, 0, 0, 0.6); 18 | text-transform: capitalize; 19 | overflow: hidden; 20 | word-break: break-word; 21 | margin-right: 10px; 22 | } 23 | 24 | :host>.column:first-child { 25 | padding-left: 13px; 26 | color: black; 27 | } 28 | 29 | .severity-wrapper { 30 | display: flex; 31 | justify-content: flex-start; 32 | align-items: center; 33 | } 34 | 35 | .severity-wrapper>div:nth-child(2) { 36 | text-transform: capitalize; 37 | margin-left: 10px; 38 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/vulnerability-state-list/vulnerability-state-item/vulnerability-state-item.component.html: -------------------------------------------------------------------------------- 1 |
2 | {{ item.cve || 'No Data' }} 3 |
4 |
6 | {{ item.severity || 'No Data' }} 7 |
8 |
10 | {{ item.wasRunning || 'No Data' }} 11 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/vulnerability-state-list/vulnerability-state-item/vulnerability-state-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | // models 3 | import { VulnerabilityState } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-vulnerability-state-item', 7 | templateUrl: './vulnerability-state-item.component.html', 8 | styleUrls: ['./vulnerability-state-item.component.css'] 9 | }) 10 | export class VulnerabilityStateItemComponent { 11 | @Input() public item: VulnerabilityState; 12 | @Output() public valueClick: EventEmitter<{ key: string, value: string }>; 13 | 14 | constructor() { 15 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 16 | } 17 | 18 | public onValueClick(key: string, value: any): void { 19 | if (value) { 20 | this.valueClick.emit({ key, value: String(value) }); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/vulnerability-state-list/vulnerability-state-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | } 5 | 6 | .list-header { 7 | display: flex; 8 | border-bottom: 1px solid #E9E9E9; 9 | height: 30px; 10 | flex-shrink: 0; 11 | } 12 | 13 | .list-header>.column { 14 | display: flex; 15 | flex: 1; 16 | justify-content: flex-start; 17 | align-items: center; 18 | font-family: SegoeUI; 19 | font-size: 12px; 20 | height: 30px; 21 | color: rgba(0, 0, 0, 0.6); 22 | margin-right: 10px; 23 | } 24 | 25 | .list-header>.column:first-child { 26 | padding-left: 13px; 27 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/details-items/vulnerability-state-list/vulnerability-state-list.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
Cve
4 |
Severity
5 |
Was running
6 |
7 | 8 | 9 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/header/header.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | margin-top: 10px; 4 | } 5 | 6 | :host>label { 7 | font-family: SegoeUI; 8 | font-size: 20px; 9 | color: black; 10 | font-weight: bold; 11 | } 12 | 13 | .severity-container { 14 | margin: 5px 25px 0 25px; 15 | } 16 | 17 | .status { 18 | font-family: SegoeUI; 19 | font-size: 20px; 20 | color: rgba(0, 0, 0, 0.6); 21 | font-weight: bold; 22 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/header/header.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 |
/   {{ status }}
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/header/header.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-alert-details-header', 5 | templateUrl: './header.component.html', 6 | styleUrls: ['./header.component.css'] 7 | }) 8 | export class AlertDetailsHeaderComponent { 9 | @Input() title: string; 10 | @Input() severity: string; 11 | @Input() status: string; 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/main-info/main-info.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-shrink: 0; 4 | background: white; 5 | border-bottom: 1px solid #E9E9E9; 6 | } 7 | 8 | .container { 9 | display: flex; 10 | flex-direction: column; 11 | padding: 15px 20px; 12 | overflow: hidden; 13 | } 14 | 15 | .container:not(.fixed-width) { 16 | flex: 3; 17 | } 18 | 19 | .container.fixed-width { 20 | flex: 1; 21 | } 22 | 23 | .container:not(:last-child) { 24 | border-right: 1px solid #E9E9E9; 25 | } 26 | 27 | .container>label { 28 | font-family: SegoeUI; 29 | font-size: 14px; 30 | font-weight: bolder; 31 | color: rgba(0, 0, 0, 0.6); 32 | margin-bottom: 10px; 33 | } 34 | 35 | .row { 36 | display: flex; 37 | } 38 | 39 | .row:not(:last-child) { 40 | margin-bottom: 15px; 41 | } 42 | 43 | .row>* { 44 | flex: 1; 45 | } 46 | 47 | .row>*:not(:last-child) { 48 | margin-right: 10px; 49 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alert-details/update-alert-form/update-alert-form.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | background: white; 5 | flex-grow: 1; 6 | padding: 16px 22px; 7 | } 8 | 9 | :host>label { 10 | font-family: SegoeUI; 11 | font-size: 20px; 12 | color: black; 13 | font-weight: bold; 14 | } 15 | 16 | .form-row { 17 | margin-top: 12px; 18 | } 19 | 20 | .form-actions { 21 | margin-top: 16px; 22 | display: flex; 23 | justify-content: flex-end; 24 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alert-list/alert-item/alert-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core'; 2 | // models 3 | import { Alert } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-alert-item', 7 | templateUrl: './alert-item.component.html', 8 | styleUrls: ['./alert-item.component.css'] 9 | }) 10 | export class AlertItemComponent { 11 | @Input() public item: Alert; 12 | @Output() public itemSelect: EventEmitter; 13 | 14 | @HostListener('click') 15 | onClick() { this.itemSelect.emit(this.item.id); } 16 | 17 | constructor() { 18 | this.itemSelect = new EventEmitter(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alert-list/alert-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | overflow-y: hidden; 5 | } 6 | 7 | .container-header { 8 | font-family: SegoeUI; 9 | font-size: 14px; 10 | color: #2D2D2D; 11 | margin-bottom: 19px; 12 | flex-shrink: 0; 13 | } 14 | 15 | .list-header { 16 | display: flex; 17 | border-bottom: 1px solid #E9E9E9; 18 | height: 30px; 19 | flex-shrink: 0; 20 | } 21 | 22 | .list-header>.column { 23 | display: flex; 24 | justify-content: flex-start; 25 | align-items: center; 26 | font-family: SegoeUI; 27 | font-size: 12px; 28 | height: 30px; 29 | color: rgba(0, 0, 0, 0.6); 30 | margin-right: 10px; 31 | } 32 | 33 | .list-header>.column:first-child { 34 | padding-left: 13px; 35 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alert-list/alert-list.component.html: -------------------------------------------------------------------------------- 1 |
{{ title }}
2 |
3 |
Title
4 |
Severity
5 |
Status
6 |
Category
7 |
Create Date Time
8 |
AssignedTo
9 |
Provider
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alert-list/alert-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, HostBinding } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | // models 4 | import { Alert } from 'src/app/models/graph'; 5 | 6 | @Component({ 7 | selector: 'app-alert-list', 8 | templateUrl: './alert-list.component.html', 9 | styleUrls: ['./alert-list.component.css'] 10 | }) 11 | export class AlertListComponent { 12 | public title = 'Matching Alerts'; 13 | 14 | @Input() public alerts: Alert[]; 15 | @HostBinding('class.page-content-linear-container') hostClass = true; 16 | 17 | constructor(private router: Router) { } 18 | 19 | public itemSelect(alertId: string): void { 20 | if (alertId) { 21 | // navigate to the alert details page 22 | this.router.navigate([`/alerts/${alertId}`]); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alert-list/display-name-pipe/display-name.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | @Pipe({ name: 'displayName' }) 4 | export class DisplayNamePipe implements PipeTransform { 5 | transform(value: string): string { 6 | if (value && typeof value === 'string' && value.indexOf('@') > -1) { 7 | return value.split('@')[0]; 8 | } 9 | return value; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alerts.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | flex-grow: 1; 3 | display: flex; 4 | flex-direction: row; 5 | overflow: hidden; 6 | } 7 | 8 | .page-content { 9 | display: flex; 10 | overflow: hidden; 11 | flex-direction: column; 12 | flex-grow: 1; 13 | margin-right: 10px; 14 | box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.25); 15 | } 16 | 17 | .alerts { 18 | flex-grow: 1; 19 | display: flex; 20 | flex-direction: column; 21 | overflow: hidden; 22 | } 23 | 24 | .header-title { 25 | font-family: SegoeUI; 26 | font-size: 20px; 27 | color: #2D2D2D; 28 | margin-top: 7px; 29 | text-transform: capitalize; 30 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/alerts.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
{{ title }}
4 |
5 |
6 | 7 | 8 |
9 |
10 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/query-list/query-item/query-item.component.html: -------------------------------------------------------------------------------- 1 |
{{ title }}:
2 |
3 | 4 |
5 |
6 | 7 | 10 | 11 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/query-list/query-item/query-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, ViewEncapsulation } from '@angular/core'; 2 | // services 3 | import { ClipboardService } from 'ngx-clipboard'; 4 | 5 | @Component({ 6 | selector: 'app-query-item', 7 | templateUrl: './query-item.component.html', 8 | styleUrls: ['./query-item.component.css'], 9 | // encapsulation: ViewEncapsulation.None, 10 | }) 11 | export class QueryItemComponent { 12 | @Input() title: string; 13 | @Input() value: string; 14 | 15 | public constructor(private clipboardService: ClipboardService) { } 16 | 17 | public copyToClipboard(text: string): void { 18 | this.clipboardService.copyFromContent(text); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/query-list/query-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-shrink: 0; 4 | } 5 | 6 | .queries-list-container { 7 | flex-grow: 1; 8 | flex-shrink: 1; 9 | overflow: hidden; 10 | } 11 | 12 | .action-button { 13 | display: flex; 14 | justify-content: flex-end; 15 | align-items: flex-end; 16 | width: 137px; 17 | flex-shrink: 0; 18 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/alerts/query-list/query-list.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 | 6 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/dashboard-list/dashboard-item/dashboard-item.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | height: 60px; 4 | } 5 | 6 | :host(:nth-child(even)) { 7 | background: #F6F6F6; 8 | } 9 | 10 | :host>.column { 11 | display: flex; 12 | justify-content: flex-start; 13 | align-items: center; 14 | font-family: SegoeUI; 15 | font-size: 14px; 16 | color: rgba(0, 0, 0, 0.6); 17 | overflow: hidden; 18 | word-break: break-word; 19 | } 20 | 21 | :host>.column:not(:last-child) { 22 | margin-right: 10px; 23 | } 24 | 25 | :host>.column:first-child { 26 | padding-left: 13px; 27 | color: black; 28 | } 29 | :host>.column:last-child { 30 | justify-content: flex-end; 31 | margin-right: 20px; 32 | } 33 | .title{ 34 | white-space: nowrap; 35 | overflow: hidden; 36 | text-overflow: ellipsis; 37 | } 38 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/dashboard-list/dashboard-item/dashboard-item.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{item.specification.title}} 4 |
5 |
6 |
7 | 8 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/dashboard-list/dashboard-item/dashboard-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | import { ModelWithTheMostAlert } from 'src/app/models/graph/alert-statistic.model'; 3 | 4 | @Component({ 5 | selector: 'app-dashboard-item', 6 | templateUrl: './dashboard-item.component.html', 7 | styleUrls: ['./dashboard-item.component.css'] 8 | }) 9 | export class DashboardItemComponent { 10 | 11 | public row = 'row'; 12 | @Input() public item: ModelWithTheMostAlert; 13 | @Output() valueClick: EventEmitter<{value: string}>; 14 | 15 | constructor() { 16 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 17 | } 18 | 19 | onClick() { 20 | if (this.item.specification.filterValue) { 21 | this.valueClick.emit({ 22 | value: this.item.specification.filterValue 23 | }); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/dashboard-list/dashboard-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | overflow-y: hidden; 5 | flex-shrink: 0; 6 | } 7 | 8 | app-dashboard-item { 9 | height: 40px; 10 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/dashboard-list/dashboard-list.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/dashboard-list/dashboard-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, Output, EventEmitter } from '@angular/core'; 2 | import { ModelWithTheMostAlert } from 'src/app/models/graph/alert-statistic.model'; 3 | 4 | @Component({ 5 | selector: 'app-dashboard-list', 6 | templateUrl: './dashboard-list.component.html', 7 | styleUrls: ['./dashboard-list.component.css'] 8 | }) 9 | export class DashboardListComponent { 10 | @Input() public key: string; 11 | @Input() public items: ModelWithTheMostAlert[]; 12 | @Output() valueClick: EventEmitter<{ key: string, value: string }>; 13 | 14 | constructor() { 15 | this.valueClick = new EventEmitter<{ key: string, value: string }>(); 16 | } 17 | 18 | public onValueClick(filterValue: {value: string }): void { 19 | if (filterValue.value) { 20 | this.valueClick.emit({ 21 | key: this.key, 22 | value: filterValue.value 23 | }); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-status-alerts/doughnut-chart/doughnut-chart.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-status-alerts/doughnut-chart/doughnut-chart.component.css -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-status-alerts/doughnut-chart/doughnut-chart.component.html: -------------------------------------------------------------------------------- 1 |
2 | 11 | 12 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-status-alerts/operation-status-alerts.component.css: -------------------------------------------------------------------------------- 1 | p{ 2 | font-family: "Segoe UI"; 3 | margin-bottom: 0px; 4 | margin-top:0px; 5 | font-size: 14px; 6 | font-weight: 500; 7 | } 8 | .statuses{ 9 | display: flex; 10 | flex-direction: row; 11 | justify-content: space-between; 12 | flex-basis: 100%; 13 | } 14 | .operationStatus-sum{ 15 | display: flex; 16 | flex:10; 17 | flex-direction: column; 18 | margin-left: 5px; 19 | } 20 | .operation-status{ 21 | font-size: 18px; 22 | } 23 | p.sum{ 24 | font-size: 40px; 25 | color:black; 26 | font-weight: normal; 27 | } 28 | .status-labels{ 29 | display: flex; 30 | flex:3; 31 | flex-direction: column; 32 | justify-content: space-between; 33 | margin-left: 10px; 34 | margin-right: 10px; 35 | overflow: hidden; 36 | text-overflow: ellipsis; 37 | } 38 | app-severity-levels-alerts{ 39 | flex:3; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-status-alerts/operation-status-alerts.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 |

{{alertByStatus.statusName}}

6 |

{{sumValue}}

7 |
8 | 9 |
10 |

High

11 |

Medium

12 |

Low

13 |

Informational

14 |
15 | 16 | 17 | 18 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-status-alerts/operation-status-alerts.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, Input } from '@angular/core'; 2 | import { Value, ActiveAlert } from 'src/app/models/graph/alert-statistic.model'; 3 | 4 | @Component({ 5 | selector: 'app-operation-status-alerts', 6 | templateUrl: './operation-status-alerts.component.html', 7 | styleUrls: ['./operation-status-alerts.component.css'] 8 | }) 9 | export class OperationStatusAlertsComponent implements OnInit { 10 | 11 | public statusValues: string[]; 12 | public values: Value[]; 13 | public sumValue: number; 14 | public column = 'column'; 15 | 16 | @Input() public alertByStatus: ActiveAlert; 17 | 18 | ngOnInit(): void { 19 | this.statusValues = this.alertByStatus.values.map(el => el.amount); 20 | this.values = this.alertByStatus.values; 21 | this.sumValue = this.statusValues.reduce((a, b) => (+a) + (+b), 0); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-statuses-alerts.component.css: -------------------------------------------------------------------------------- 1 | .alert-statuses-box{ 2 | display:flex; 3 | flex-direction: column; 4 | justify-content: stretch; 5 | } 6 | .alert-statuses-box > * { 7 | display: flex; 8 | margin-top: 20px; 9 | flex:1; 10 | } 11 | .alert-statuses-box > *:first-child{ 12 | margin-top: 0px; 13 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-statuses-alerts.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/operation-statuses-alerts/operation-statuses-alerts.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, Input } from '@angular/core'; 2 | import { ActiveAlert } from 'src/app/models/graph/alert-statistic.model'; 3 | 4 | @Component({ 5 | selector: 'app-operation-statuses-alerts', 6 | templateUrl: './operation-statuses-alerts.component.html', 7 | styleUrls: ['./operation-statuses-alerts.component.css'] 8 | }) 9 | export class OperationStatusesAlertsComponent { 10 | 11 | @Input() public alertsByStatus: ActiveAlert[]; 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/severity-levels-alerts/severity-level-alerts/severity-level-alerts.component.css: -------------------------------------------------------------------------------- 1 | div,p{ 2 | display: inline-block; 3 | margin-top: auto; 4 | margin-bottom: auto; 5 | } 6 | div { 7 | height: 8px; 8 | width: 8px; 9 | min-width: 8px; 10 | border-radius: 200%; 11 | } 12 | p{ 13 | margin-left: 5px; 14 | font-family: "SegoeUI"; 15 | font-size: 14px; 16 | font-weight: 500; 17 | } 18 | 19 | .severity-level.High { 20 | background: #C00000; 21 | } 22 | 23 | .severity-level.Medium { 24 | background: #FFC700; 25 | } 26 | 27 | .severity-level.Low { 28 | background: #F2994A; 29 | } 30 | 31 | .severity-level.Informational { 32 | background: #C4C4C4; 33 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/severity-levels-alerts/severity-level-alerts/severity-level-alerts.component.html: -------------------------------------------------------------------------------- 1 |
2 |

{{value}}

-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/severity-levels-alerts/severity-level-alerts/severity-level-alerts.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, OnInit } from '@angular/core'; 2 | import { Value } from 'src/app/models/graph/alert-statistic.model'; 3 | 4 | @Component({ 5 | selector: 'app-severity-level-alerts', 6 | templateUrl: './severity-level-alerts.component.html', 7 | styleUrls: ['./severity-level-alerts.component.css'] 8 | }) 9 | export class SeverityLevelAlertsComponent implements OnInit { 10 | public name: string; 11 | public value: string; 12 | 13 | @Input() public Value: Value; 14 | 15 | ngOnInit(): void { 16 | this.name = this.Value.name; 17 | this.value = this.Value.amount; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/severity-levels-alerts/severity-levels-alerts.component.css: -------------------------------------------------------------------------------- 1 | :host{ 2 | display: flex; 3 | justify-content: space-between; 4 | flex-basis: 100%; 5 | } 6 | .box.row{ 7 | display: flex; 8 | flex-basis: 100%; 9 | justify-content: space-between; 10 | } 11 | .box.column{ 12 | display: flex; 13 | flex-direction: column; 14 | flex-basis: 100%; 15 | justify-content: space-between; 16 | } 17 | app-severity-levels-alerts{ 18 | min-width: 30px; 19 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/severity-levels-alerts/severity-levels-alerts.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/dashboard/severity-levels-alerts/severity-levels-alerts.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, OnInit } from '@angular/core'; 2 | import { ActiveAlert, Value } from 'src/app/models/graph/alert-statistic.model'; 3 | 4 | @Component({ 5 | selector: 'app-severity-levels-alerts', 6 | templateUrl: './severity-levels-alerts.component.html', 7 | styleUrls: ['./severity-levels-alerts.component.css'] 8 | }) 9 | export class SeverityLevelsAlertsComponent { 10 | @Input() public direction: string; 11 | @Input() public values: Value[]; 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/secure-score/components/secure-score-expandable-list/secure-score-expandable-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, AfterContentInit } from '@angular/core'; 2 | // models 3 | import { SecureScoreControlProfile } from 'src/app/models/graph'; 4 | 5 | @Component({ 6 | selector: 'app-secure-score-expandable-list', 7 | templateUrl: './secure-score-expandable-list.component.html', 8 | styleUrls: ['./secure-score-expandable-list.component.css'] 9 | }) 10 | export class SecureScoreExpandableListComponent implements AfterContentInit { 11 | @Input() public action: SecureScoreControlProfile; 12 | @Input() public isExpanded = false; 13 | 14 | public secureStateUpdates = []; 15 | 16 | ngAfterContentInit() { 17 | this.secureStateUpdates = this.action && this.action.secureStateUpdates; 18 | } 19 | 20 | public toggle(): void { 21 | this.isExpanded = !this.isExpanded; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/query-list/query-item/query-item.component.html: -------------------------------------------------------------------------------- 1 |
{{ title }}:
2 |
3 | 4 |
5 |
6 | 7 | 10 | 11 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/query-list/query-item/query-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, ViewEncapsulation } from '@angular/core'; 2 | // services 3 | import { ClipboardService } from 'ngx-clipboard'; 4 | 5 | @Component({ 6 | selector: 'app-subscription-query-item', 7 | templateUrl: './query-item.component.html', 8 | styleUrls: ['./query-item.component.css'], 9 | }) 10 | export class SubscriptionQueryItemComponent { 11 | @Input() title: string; 12 | @Input() value: string; 13 | 14 | public constructor(private clipboardService: ClipboardService) { } 15 | 16 | public copyToClipboard(text: string): void { 17 | this.clipboardService.copyFromContent(text); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/query-list/query-list.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-shrink: 0; 4 | } 5 | 6 | .queries-list-container { 7 | flex-grow: 1; 8 | flex-shrink: 1; 9 | overflow: hidden; 10 | } 11 | 12 | .action-button { 13 | display: flex; 14 | justify-content: flex-end; 15 | align-items: flex-end; 16 | width: 137px; 17 | flex-shrink: 0; 18 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/query-list/query-list.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/query-list/query-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, HostBinding } from '@angular/core'; 2 | import { Queries } from 'src/app/models/response'; 3 | 4 | @Component({ 5 | selector: 'app-subscription-query-list', 6 | templateUrl: './query-list.component.html', 7 | styleUrls: ['./query-list.component.css'] 8 | }) 9 | export class SubscriptionQueryListComponent { 10 | @Input() queries: Queries; 11 | @HostBinding('class.page-content-linear-container') hostClass = true; 12 | 13 | // have Object.keys accessible in the template and use it in *ngFor 14 | public objectKeys = Object.keys; 15 | } 16 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/subscription-list/subscription-item/subscription-item.component.html: -------------------------------------------------------------------------------- 1 |
{{item.id}}
2 |
{{item.resource}}
3 |
{{item.changeType || 'No data'}}
4 |
5 | {{ item.expirationDateTime | date : 'M/d/yyyy, h:mm a' }}
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/subscription-list/subscription-item/subscription-item.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | // models 3 | import { Subscription } from 'src/app/models/graph/subscription.model'; 4 | 5 | @Component({ 6 | selector: 'app-subscription-item', 7 | templateUrl: './subscription-item.component.html', 8 | styleUrls: ['./subscription-item.component.css'] 9 | }) 10 | export class SubscriptionItemComponent { 11 | @Input() public item: Subscription; 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/subscription-list/subscription-list.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
Subscription ID
4 |
Query Filters (aka Resource)
5 |
Change Type
6 |
Expiration DateTime
7 |
8 | 9 | 10 | 11 |
12 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/subscription-list/subscription-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | // models 3 | import { Subscription } from 'src/app/models/graph/subscription.model'; 4 | 5 | @Component({ 6 | selector: 'app-subscription-list', 7 | templateUrl: './subscription-list.component.html', 8 | styleUrls: ['./subscription-list.component.css'] 9 | }) 10 | export class SubscriptionListComponent { 11 | @Input() public subscriptions: Subscription[]; 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/subscriptions.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | flex-grow: 1; 3 | display: flex; 4 | flex-direction: column; 5 | } 6 | 7 | .page-content { 8 | display: flex; 9 | overflow: hidden; 10 | flex-grow: 1; 11 | } 12 | 13 | .subscriptions { 14 | flex-grow: 1; 15 | display: flex; 16 | flex-direction: column; 17 | margin-right: 10px; 18 | box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.25); 19 | background-color: white; 20 | } 21 | 22 | .header-content { 23 | display: flex; 24 | } 25 | 26 | .header-title { 27 | font-family: SegoeUI; 28 | font-size: 20px; 29 | color: #2D2D2D; 30 | margin-top: 7px; 31 | text-transform: capitalize; 32 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/components/pages/subscriptions/subscriptions.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
{{ title }}
6 | 7 |
8 |
9 | 10 | 11 |
12 | 13 |
-------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/app/index.ts: -------------------------------------------------------------------------------- 1 | export { LoaderState } from './loader-state.model'; 2 | export { ModalValue, StateModal, RouteModal, ModalWindow } from './modal-window.model'; 3 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/app/loader-state.model.ts: -------------------------------------------------------------------------------- 1 | export class LoaderState { 2 | constructor(public IsVisible: boolean, 3 | public Message: string = 'Loading...') { } 4 | } 5 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/action.model.ts: -------------------------------------------------------------------------------- 1 | import { SecurityVendorInformation } from '.'; 2 | 3 | export class Action { 4 | public name: string; 5 | public submittedDateTime: Date | string | null; 6 | public target: ActionTarget; 7 | public reason: ActionReason; 8 | public securityVendorInformation: SecurityVendorInformation; 9 | public status: OperationStatus; 10 | public statusUpdateTime: Date | string | null; 11 | } 12 | 13 | export class ActionTarget { 14 | public name: string; 15 | public value: string; 16 | } 17 | 18 | export class ActionReason { 19 | public comment: string; 20 | public alertId?: string; 21 | } 22 | 23 | export enum OperationStatus { 24 | Pending = 'Pending', 25 | Complete = 'Complete' 26 | } 27 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/alert-history-state.model.ts: -------------------------------------------------------------------------------- 1 | import { User } from '.'; 2 | 3 | export class AlertHistoryState { 4 | public appId: string; 5 | public assignedTo: User; 6 | public feedback: string; 7 | public updatedDateTime: Date; 8 | public user: User; 9 | public status: string; 10 | public comments: string[]; 11 | } 12 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/alert.model.ts: -------------------------------------------------------------------------------- 1 | export class Alert { 2 | id: string; 3 | title: string; 4 | severity: string; 5 | category: string; 6 | status: string; 7 | createdDateTime: Date | string | null; 8 | provider: string; 9 | assignedTo: string; 10 | } 11 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/average-comparative-score.model.ts: -------------------------------------------------------------------------------- 1 | export class AverageComparativeScore { 2 | averageScore?: number; 3 | // basis: string; 4 | comparedBy: string; 5 | value: string; 6 | amount: number; 7 | name: string; 8 | // additionalData: IDictionary; 9 | } 10 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/cloud-app-security-state.model.ts: -------------------------------------------------------------------------------- 1 | export class CloudAppSecurityState { 2 | public destinationServiceIp: string; 3 | public destinationServiceName: string; 4 | public riskScore: string; 5 | public additionalData: { [key: string]: any }; 6 | } 7 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/control-score.model.ts: -------------------------------------------------------------------------------- 1 | export class ControlScore { 2 | controlCategory: string; 3 | controlName: string; 4 | description: string; 5 | score?: number; 6 | // additionalData: IDictionary; 7 | } 8 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/control-state-update.model.ts: -------------------------------------------------------------------------------- 1 | export class ControlStateUpdate { 2 | upnAssignedTo: string; 3 | displayNameAssignedTo: string; 4 | state: string; 5 | comment: string; 6 | upnUpdatedBy: string; 7 | displayNameUpdatedBy: string; 8 | updatedDateTime: string; 9 | assignTo: string; 10 | updatedBy: string; 11 | } 12 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/device.model.ts: -------------------------------------------------------------------------------- 1 | export class Device { 2 | public deviceId: string; 3 | public displayName: string; 4 | public deviceMetadata: string; 5 | public deviceVersion: string; 6 | public isCompliant: boolean | null; 7 | public operatingSystem: string; 8 | public operatingSystemVersion: string; 9 | public isManaged: boolean | null; 10 | public accountEnabled: boolean | null; 11 | public approximateLastSignInDateTime: Date | string | null; 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/file-security-state.model.ts: -------------------------------------------------------------------------------- 1 | export class FileSecurityState { 2 | public fileHash: FileHash; 3 | public name: string; 4 | public path: string; 5 | public riskScore: string; 6 | public additionalData: { [key: string]: any }; 7 | } 8 | 9 | export class FileHash { 10 | hashType: FileHashType | null; 11 | hashValue: string; 12 | additionalData: { [key: string]: any }; 13 | } 14 | 15 | export enum FileHashType { 16 | Unknown = 0, 17 | Sha1 = 1, 18 | Sha256 = 2, 19 | Md5 = 3, 20 | AuthenticodeHash256 = 4, 21 | LsHash = 5, 22 | Ctph = 6, 23 | PeSha1 = 7, 24 | PeSha256 = 8, 25 | UnknownFutureValue = 127 26 | } 27 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/host-security-state.model.ts: -------------------------------------------------------------------------------- 1 | export class HostSecurityState { 2 | public fqdn: string; 3 | public isAzureAdJoined: boolean | null; 4 | public isAzureAdRegistered: boolean | null; 5 | public isHybridAzureDomainJoined: boolean | null; 6 | public netBiosName: string; 7 | public os: string; 8 | public privateIpAddress: string; 9 | public publicIpAddress: string; 10 | public riskScore: string; 11 | public additionalData: { [key: string]: any }; 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/malware-state.model.ts: -------------------------------------------------------------------------------- 1 | export class MalwareState { 2 | public category: string; 3 | public family: string; 4 | public name: string; 5 | public severity: string; 6 | public wasRunning: boolean | null; 7 | public additionalData: { [key: string]: any }; 8 | } 9 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/process.model.ts: -------------------------------------------------------------------------------- 1 | import { FileHash } from '.'; 2 | 3 | export class Process { 4 | public accountName: string; 5 | public commandLine: string; 6 | public createdDateTime: Date | string | null; 7 | public fileHash: FileHash; 8 | public integrityLevel: ProcessIntegrityLevel | null; 9 | public isElevated: boolean | null; 10 | public name: string; 11 | public parentProcessCreatedDateTime: Date | string | null; 12 | public parentProcessId: number | null; 13 | public parentProcessName: string; 14 | public path: string; 15 | public processId: number | null; 16 | public additionalData: { [key: string]: any }; 17 | } 18 | 19 | export enum ProcessIntegrityLevel { 20 | Unknown = 0, 21 | Untrusted = 1, 22 | Low = 2, 23 | Medium = 3, 24 | High = 4, 25 | System = 5, 26 | UnknownFutureValue = 127 27 | } 28 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/risky-user.model.ts: -------------------------------------------------------------------------------- 1 | export class RiskyUser { 2 | id: string; 3 | isDeleted: boolean; 4 | isGuest: boolean; 5 | isProcessing: boolean; 6 | riskLevel: string; 7 | riskState: string; 8 | riskDetail: string; 9 | riskLastUpdatedDateTime: Date; 10 | userDisplayName: string; 11 | userPrincipalName: string; 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/secure-score-control-profile.model.ts: -------------------------------------------------------------------------------- 1 | import { ControlStateUpdate } from './control-state-update.model'; 2 | 3 | export class SecureScoreControlProfile { 4 | controlCategory: string; 5 | rank: number; 6 | title: string; 7 | maxScore?: number; 8 | userImpact: string; 9 | implementationCost: string; 10 | lastModifiedDateTime?: Date; 11 | actionUrl: string; 12 | deprecated?: boolean; 13 | remediation: string; 14 | remediationImpact: string; 15 | service: string; 16 | tier: string; 17 | azureTenantId: string; 18 | tenantSetState: string; 19 | tenantNote: string; 20 | threats: string[]; 21 | secureStateUpdates: ControlStateUpdate[]; 22 | } 23 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/secure-score-details.model.ts: -------------------------------------------------------------------------------- 1 | import { SecureScore } from './secure-score.model'; 2 | import { SecureScoreControlProfile } from './secure-score-control-profile.model'; 3 | 4 | export class SecureScoreDetails { 5 | topSecureScore: SecureScore; 6 | secureScoreControlProfiles: SecureScoreControlProfile[]; 7 | } 8 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/secure-score.model.ts: -------------------------------------------------------------------------------- 1 | import { SecurityVendorInformation } from './security-vendor.model'; 2 | import { AverageComparativeScore } from './average-comparative-score.model'; 3 | import { ControlScore } from './control-score.model'; 4 | 5 | export class SecureScore { 6 | activeUserCount?: number; 7 | averageComparativeScores: AverageComparativeScore[]; 8 | azureTenantId: string; 9 | controlScores: ControlScore[]; 10 | createdDateTime?: Date; 11 | currentScore?: number; 12 | enabledServices: string[]; 13 | id: string; 14 | licensedUserCount?: number; 15 | maxScore?: number; 16 | vendorInformation: SecurityVendorInformation; 17 | oDataType: string; 18 | // additionalData: IDictionary; 19 | } 20 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/security-vendor.model.ts: -------------------------------------------------------------------------------- 1 | export class SecurityVendorInformation { 2 | public provider: string; 3 | public providerVersion: string; 4 | public subProvider: string; 5 | public vendor: string; 6 | public additionalData: { [key: string]: any }; 7 | } 8 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/subscription.model.ts: -------------------------------------------------------------------------------- 1 | export class Subscription { 2 | id: string; 3 | changeType: string; 4 | clientState: string; 5 | expirationDateTime: string | null; 6 | notificationUrl: string; 7 | resource: string; 8 | error: string; 9 | } 10 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/trigger.model.ts: -------------------------------------------------------------------------------- 1 | export class Trigger { 2 | public name: string; 3 | public type: string; 4 | public value: string; 5 | public additionalData: { [key: string]: any }; 6 | } 7 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/user.model.ts: -------------------------------------------------------------------------------- 1 | import { Device, RiskyUser } from '.'; 2 | 3 | export class User { 4 | public displayName: string; 5 | public email: string; 6 | public upn: string; 7 | public jobTitle: string; 8 | public manager: User; 9 | public officeLocation: string; 10 | public contactVia: string; 11 | public picture: string; 12 | public emailRole: string; 13 | public riskScore: string; 14 | public logonId: string; 15 | public riskyUser: RiskyUser; 16 | public domainName: string; 17 | public registeredDevices: Device[]; 18 | public ownedDevices: Device[]; 19 | } 20 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/graph/vulnerability-state.model.ts: -------------------------------------------------------------------------------- 1 | export class VulnerabilityState { 2 | public cve: string; 3 | public severity: string; 4 | public wasRunning: boolean | null; 5 | public additionalData: { [key: string]: any }; 6 | } 7 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/request/action-create.model.ts: -------------------------------------------------------------------------------- 1 | import { ActionTarget, ActionReason } from '../graph/action.model'; 2 | 3 | export class ActionCreateModel { 4 | public name: string; 5 | public target: ActionTarget; 6 | public reason: ActionReason; 7 | public vendor: string; 8 | public user: string; 9 | } 10 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/request/alert-update.model.ts: -------------------------------------------------------------------------------- 1 | export class AlertUpdateModel { 2 | id: string; 3 | userUpn: string; 4 | status: string; 5 | feedback: string; 6 | assignedTo: string; 7 | comments: string[]; 8 | } 9 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/request/index.ts: -------------------------------------------------------------------------------- 1 | export { AlertUpdateModel } from './alert-update.model'; 2 | export { ActionCreateModel } from './action-create.model'; 3 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/action-filter-data.model.ts: -------------------------------------------------------------------------------- 1 | export class ActionFilterData { 2 | [key: string]: any; 3 | } 4 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/action-values.model.ts: -------------------------------------------------------------------------------- 1 | export class ActionValues { 2 | constructor( 3 | public actionProviders: string[] = [], 4 | public actionStatuses: string[] = [], 5 | public actionNames: string[] = [], 6 | public actionTargets: string[] = [] 7 | ) { } 8 | } 9 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/alert-filter-data.model.ts: -------------------------------------------------------------------------------- 1 | export class AlertFilterData { 2 | [key: string]: any; 3 | } 4 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/alert-search-result.model.ts: -------------------------------------------------------------------------------- 1 | import { Alert, AlertDetails } from '../graph'; 2 | import { Queries } from '.'; 3 | 4 | export interface AlertSearchResult { 5 | alerts: Alert[]; 6 | queries: Queries; 7 | } 8 | 9 | export interface AlertDetailsResult { 10 | alertDetails: AlertDetails; 11 | queries: Queries; 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/alert-values.model.ts: -------------------------------------------------------------------------------- 1 | export class AlertValues { 2 | constructor( 3 | public alertStatuses: string[] = [], 4 | public alertSeverities: string[] = [], 5 | public alertFeedbacks: string[] = [], 6 | public alertProviders: string[] = [], 7 | public alertCategories: string[] = [] 8 | ) { } 9 | } 10 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/index.ts: -------------------------------------------------------------------------------- 1 | export { AlertSearchResult, AlertDetailsResult } from './alert-search-result.model'; 2 | export { ActionFilterData } from './action-filter-data.model'; 3 | export { AlertFilterData } from './alert-filter-data.model'; 4 | export { AlertValues } from './alert-values.model'; 5 | export { ActionValues } from './action-values.model'; 6 | export { SubscriptionFilterData } from './subscription-filter-data.model'; 7 | export { SecureScoreResult } from './secure-score-result.model'; 8 | export { SecureScoreDetailsResponse } from './secure-score-details-response.model'; 9 | export { Queries } from './queries.model'; 10 | export { SubscriptionSearchResult } from './subscruption-search-result.model'; 11 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/queries.model.ts: -------------------------------------------------------------------------------- 1 | export class Queries { 2 | sDKQuery: string; 3 | rESTQuery: string; 4 | } 5 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/secure-score-details-response.model.ts: -------------------------------------------------------------------------------- 1 | import { SecureScoreDetails } from '../graph'; 2 | import { Queries } from '.'; 3 | 4 | export class SecureScoreDetailsResponse { 5 | secureScoreDetails: SecureScoreDetails; 6 | queries: Queries; 7 | } 8 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/secure-score-result.model.ts: -------------------------------------------------------------------------------- 1 | import { SecureScore } from '../graph/secure-score.model'; 2 | 3 | export class SecureScoreResult { 4 | oDataContext: string; 5 | oDataNextLink: string; 6 | value: SecureScore[]; 7 | } 8 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/subscription-filter-data.model.ts: -------------------------------------------------------------------------------- 1 | export class SubscriptionFilterData { 2 | [key: string]: any; 3 | } 4 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/models/response/subscruption-search-result.model.ts: -------------------------------------------------------------------------------- 1 | import { Subscription } from '../graph'; 2 | import { Queries } from '.'; 3 | 4 | export interface SubscriptionSearchResult { 5 | subscriptions: Subscription[]; 6 | queries: Queries; 7 | } 8 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/routing/app-routing.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { AppRoutingModule } from './app-routing.module'; 2 | 3 | describe('AppRoutingModule', () => { 4 | let appRoutingModule: AppRoutingModule; 5 | 6 | beforeEach(() => { 7 | appRoutingModule = new AppRoutingModule(); 8 | }); 9 | 10 | it('should create an instance', () => { 11 | expect(appRoutingModule).toBeTruthy(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/services/alert.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Observable } from 'rxjs'; 3 | 4 | // models 5 | import { AlertSearchResult, AlertDetailsResult } from '../models/response'; 6 | import { AlertFilterData } from '../models/response'; 7 | // services 8 | import { HttpService } from './http.service'; 9 | import { AlertUpdateModel } from '../models/request'; 10 | 11 | @Injectable({ providedIn: 'root' }) 12 | export class AlertService { 13 | constructor( 14 | private http: HttpService) { } 15 | 16 | getAlertsByFilter(filter: AlertFilterData): Observable { 17 | return this.http.post('alerts', filter); 18 | } 19 | 20 | getAlertDetails(id: string): Observable { 21 | return this.http.get(`alerts/${id}`); 22 | } 23 | 24 | updateAlert(alert: AlertUpdateModel): Observable { 25 | return this.http.patch(`alerts/${alert.id}`, alert); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/services/dashboard.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | import { Observable, of } from 'rxjs'; 4 | import { catchError, map } from 'rxjs/operators'; 5 | import { environment } from 'src/environments/environment'; 6 | 7 | 8 | // models 9 | import { AlertStatistics } from '../models/graph/alert-statistic.model'; 10 | // services 11 | import { HttpService } from './http.service'; 12 | 13 | @Injectable({ providedIn: 'root' }) 14 | export class DashboardService { 15 | constructor( 16 | private http: HttpService) { } 17 | 18 | getAlertStatistics(): Observable { 19 | return this.http.get(`alerts/Statistics/200`); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/services/index.ts: -------------------------------------------------------------------------------- 1 | // user 2 | export { UserService } from './user.service'; 3 | // alerts 4 | export { AlertValuesService } from './alert-values.service'; 5 | export { AlertFilterService } from './alert-filter.service'; 6 | export { AlertService } from './alert.service'; 7 | // actions 8 | export { ActionFilterService } from './action-filter.service'; 9 | export { ActionValuesService } from './action-values.service'; 10 | export { ActionService } from './action.service'; 11 | // secure score 12 | export { SecureScoreService } from './secure-score.service'; 13 | export { SubscriptionFilterService } from './subscription-filter.service'; 14 | export { SubscriptionService } from './subscription.service'; 15 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/services/loader.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable, EventEmitter } from '@angular/core'; 2 | // models 3 | import { LoaderState } from '../models/app'; 4 | 5 | @Injectable({ providedIn: 'root' }) 6 | export class LoaderService { 7 | public Event: EventEmitter; 8 | 9 | constructor() { 10 | this.Event = new EventEmitter(); 11 | } 12 | 13 | public Show(message: string): void { 14 | this.Event.emit(new LoaderState(true, message)); 15 | } 16 | 17 | public Hide(): void { 18 | this.Event.emit({ IsVisible: false, Message: '' }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/app/services/secure-score.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Observable } from 'rxjs'; 3 | 4 | // models 5 | import { SecureScoreDetailsResponse } from '../models/response'; 6 | 7 | // services 8 | import { HttpService } from './http.service'; 9 | 10 | 11 | @Injectable({ providedIn: 'root' }) 12 | export class SecureScoreService { 13 | constructor( 14 | private http: HttpService) { } 15 | 16 | getSecureScoreDetails(): Observable { 17 | return this.http.get('securescores/GetSecureDetails'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/.gitkeep -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeui.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeui.ttf -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeuib.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeuib.ttf -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeuii.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeuii.ttf -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeuiz.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/assets/fonts/segoeuiz.ttf -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed 5 | > 0.5% 6 | last 2 versions 7 | Firefox ESR 8 | not dead 9 | # IE 9-11 -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/environments/environment.interface.ts: -------------------------------------------------------------------------------- 1 | export interface IEnvironment { 2 | production: boolean; 3 | baseUrl: string; 4 | MSAL: { 5 | clientID: string; 6 | redirectUri: string; 7 | cacheLocation: 'localStorage' | 'sessionStorage'; 8 | piiLoggingEnabled: boolean; 9 | authority: string, 10 | validateAuthority: boolean, 11 | protectedResourceMap: [[string, string[]]] 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | import { IEnvironment } from './environment.interface'; 2 | 3 | export const environment: IEnvironment = { 4 | production: true, 5 | baseUrl: '/api', 6 | MSAL: { 7 | clientID: 'Enter_Your_Appid', 8 | redirectUri: 'Enter_Your_URL', 9 | cacheLocation: 'localStorage', 10 | piiLoggingEnabled: true, 11 | authority: 'https://login.microsoftonline.com/common', 12 | validateAuthority: true, 13 | protectedResourceMap: [['/api', ['Enter_Your_Appid']]] 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Graph Security API 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
Loading...
33 |
34 |
35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | // export function getBaseUrl() { 8 | // return document.getElementsByTagName('base')[0].href; 9 | // } 10 | 11 | // const providers = [ 12 | // { provide: 'BASE_URL', useFactory: getBaseUrl, deps: [] } 13 | // ]; 14 | 15 | if (environment.production) { 16 | enableProdMode(); 17 | } 18 | 19 | platformBrowserDynamic(/*providers*/).bootstrapModule(AppModule) 20 | .catch(err => console.log(err)); 21 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "src/test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "angularCompilerOptions": { 7 | "entryModule": "app/app.server.module#AppServerModule" 8 | } 9 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "types": [ 7 | "jasmine", 8 | "node" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/ClientApp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Extensions/DeviceExtensions.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using Microsoft.Graph; 8 | using System.Collections.Generic; 9 | 10 | namespace MicrosoftGraph_Security_API_Sample.Extensions 11 | { 12 | public static class DeviceExtensions 13 | { 14 | public static IEnumerable ToDevices(this IUserRegisteredDevicesCollectionWithReferencesPage page) 15 | { 16 | List devices = new List(); 17 | 18 | return devices; 19 | } 20 | 21 | public static IEnumerable ToDevices(this IUserOwnedDevicesCollectionWithReferencesPage page) 22 | { 23 | List devices = new List(); 24 | 25 | return devices; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Extensions/GlobalExtensions.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using System; 8 | 9 | using System.Collections.Generic; 10 | 11 | namespace MicrosoftGraph_Security_API_Sample.Extensions 12 | { 13 | public static class GlobalExtensions 14 | { 15 | public static void AddRange(this ICollection target, IEnumerable source) 16 | { 17 | if (target == null) 18 | throw new ArgumentNullException(nameof(target)); 19 | if (source == null) 20 | throw new ArgumentNullException(nameof(source)); 21 | foreach (var element in source) 22 | target.Add(element); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Helpers/IAuthProvider.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using MicrosoftGraph_Security_API_Sample.Models.Configurations; 8 | using System.Threading.Tasks; 9 | 10 | namespace MicrosoftGraph_Security_API_Sample.Helpers 11 | { 12 | public interface IAuthProvider 13 | { 14 | Task GetUserAccessTokenAsync(AzureConfiguration azureConfiguration, string jwtToken); 15 | } 16 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Helpers/JsonStringResult.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using Microsoft.AspNetCore.Mvc; 8 | 9 | namespace MicrosoftGraph_Security_API_Sample.Helpers 10 | { 11 | public class JsonStringResult : ContentResult 12 | { 13 | public JsonStringResult(string json) 14 | { 15 | Content = json; 16 | ContentType = "application/json"; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/DomainModels/AlertTestSecurityDev.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using Newtonsoft.Json; 8 | using System.Collections.Generic; 9 | 10 | namespace MicrosoftGraph_Security_API_Sample.Models.DomainModels 11 | { 12 | public class AlertTestSecurityDev : Microsoft.Graph.Alert 13 | { 14 | [JsonProperty(PropertyName = "historyStates")] 15 | public IEnumerable HistoryStates { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/DomainModels/SecurityActionBase.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | namespace MicrosoftGraph_Security_API_Sample.Models.DomainModels 8 | { 9 | public class SecurityActionBase 10 | { 11 | public string Name { get; set; } 12 | 13 | public Target Target { get; set; } 14 | 15 | public Reason Reason { get; set; } 16 | } 17 | 18 | public class Reason 19 | { 20 | public string Comment { get; set; } 21 | public string AlertId { get; set; } 22 | } 23 | 24 | public class Target 25 | { 26 | public string Name { get; set; } 27 | public string Value { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/DomainModels/SecurityActionState.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using Microsoft.Graph; 8 | using Newtonsoft.Json; 9 | using System; 10 | 11 | namespace MicrosoftGraph_Security_API_Sample.Models.DomainModels 12 | { 13 | public class SecurityActionState 14 | { 15 | [JsonProperty(PropertyName = "user")] 16 | public string User { get; set; } 17 | 18 | [JsonProperty(PropertyName = "appId")] 19 | public string AppId { get; set; } 20 | 21 | [JsonProperty(PropertyName = "status")] 22 | public OperationStatus Status { get; set; } 23 | 24 | [JsonProperty(PropertyName = "updatedDateTime")] 25 | public DateTimeOffset UpdatedDateTime { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/NotificationCollection.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using System.Collections.Generic; 8 | 9 | namespace MicrosoftGraph_Security_API_Sample.Models 10 | { 11 | public class NotificationCollection 12 | { 13 | /// 14 | /// Initializes a new instance of the class. 15 | /// 16 | public NotificationCollection() 17 | { 18 | this.Value = new List(); 19 | } 20 | 21 | /// 22 | /// Gets or sets the top level element that contains the array 23 | /// 24 | public List Value { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/NotificationHub.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using Microsoft.AspNetCore.SignalR; 8 | using System.Threading.Tasks; 9 | 10 | namespace MicrosoftGraph_Security_API_Sample.Models 11 | { 12 | public class NotificationHub : Hub 13 | { 14 | public async Task SendMessage(string message) 15 | { 16 | await Clients.All.SendAsync("ReceiveMessage", message); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Requests/SecurityActionRequest.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using MicrosoftGraph_Security_API_Sample.Models.DomainModels; 8 | 9 | namespace MicrosoftGraph_Security_API_Sample.Models.Requests 10 | { 11 | public class SecurityActionRequest : SecurityActionBase 12 | { 13 | public string User { get; set; } 14 | 15 | public string Vendor { get; set; } 16 | 17 | public string Provider { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/ActionResponse.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using MicrosoftGraph_Security_API_Sample.Models.DomainModels; 8 | using System; 9 | using System.Collections.Generic; 10 | 11 | namespace MicrosoftGraph_Security_API_Sample.Models.Responses 12 | { 13 | public class ActionResponse 14 | { 15 | public string Id { get; set; } 16 | public string Name { get; set; } 17 | public DateTimeOffset? CreatedDateTime { get; set; } 18 | public DateTimeOffset? LastActionDateTime { get; set; } 19 | public string Provider { get; set; } 20 | public IEnumerable Parameters { get; set; } 21 | public IEnumerable States { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/AlertDetailsResponse.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using MicrosoftGraph_Security_API_Sample.Models.ViewModels; 8 | 9 | namespace MicrosoftGraph_Security_API_Sample.Models.Responses 10 | { 11 | public class AlertDetailsResponse 12 | { 13 | public AlertDetailsResponse() 14 | { 15 | } 16 | 17 | public AlertDetailsResponse(AlertDetailsViewModel alertDetails, ResultQueriesViewModel queries) 18 | { 19 | AlertDetails = alertDetails; 20 | Queries = queries; 21 | } 22 | 23 | public AlertDetailsViewModel AlertDetails { get; set; } 24 | 25 | public ResultQueriesViewModel Queries { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/AlertFilterResponse.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using System.Collections.Generic; 8 | 9 | namespace MicrosoftGraph_Security_API_Sample.Models.Responses 10 | { 11 | public class AlertFilterResponse 12 | { 13 | public string Name { get; set; } 14 | 15 | public IEnumerable Values { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/AlertUpdatedResponse.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using MicrosoftGraph_Security_API_Sample.Models.ViewModels; 8 | 9 | namespace MicrosoftGraph_Security_API_Sample.Models.Responses 10 | { 11 | public class AlertUpdatedResponse 12 | { 13 | public AlertUpdatedResponse() 14 | { 15 | } 16 | 17 | public AlertUpdatedResponse(AlertDetailsViewModel alert, ResultQueriesViewModel queries) 18 | { 19 | Alert = alert; 20 | Queries = queries; 21 | } 22 | 23 | public AlertDetailsViewModel Alert { get; set; } 24 | 25 | public ResultQueriesViewModel Queries { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/AlertsResponse.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using MicrosoftGraph_Security_API_Sample.Models.ViewModels; 8 | using System.Collections.Generic; 9 | 10 | namespace MicrosoftGraph_Security_API_Sample.Models.Responses 11 | { 12 | public class AlertsResponse 13 | { 14 | public AlertsResponse(IEnumerable alerts, ResultQueriesViewModel queries) 15 | { 16 | Alerts = alerts; 17 | Queries = queries; 18 | } 19 | 20 | public IEnumerable Alerts { get; set; } 21 | 22 | public ResultQueriesViewModel Queries { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/SecureScoreDetailsResponse.cs: -------------------------------------------------------------------------------- 1 | using MicrosoftGraph_Security_API_Sample.Models.ViewModels; 2 | 3 | namespace MicrosoftGraph_Security_API_Sample.Models.Responses 4 | { 5 | public class SecureScoreDetailsResponse 6 | { 7 | public SecureScoreDetailsResponse(SecureScoreDetailsViewModel secureScoreDetails, ResultQueriesViewModel queries) 8 | { 9 | SecureScoreDetails = secureScoreDetails; 10 | Queries = queries; 11 | } 12 | 13 | public SecureScoreDetailsViewModel SecureScoreDetails { get; set; } 14 | 15 | public ResultQueriesViewModel Queries { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/Responses/SecurityActionResponse.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using Microsoft.Graph; 8 | using System; 9 | 10 | namespace MicrosoftGraph_Security_API_Sample.Models.DomainModels 11 | { 12 | public class SecurityActionResponse : SecurityActionBase 13 | { 14 | public string Id { get; set; } 15 | 16 | public DateTimeOffset? SubmittedDateTime { get; set; } 17 | 18 | public DateTimeOffset? StatusUpdateDateTime { get; set; } 19 | 20 | public Microsoft.Graph.SecurityVendorInformation SecurityVendorInformation { get; set; } 21 | 22 | public OperationStatus Status { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/SubscriptionResultModel.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using System; 8 | 9 | namespace MicrosoftGraph_Security_API_Sample.Models 10 | { 11 | public class SubscriptionResultModel 12 | { 13 | public string Id { get; set; } 14 | 15 | public string Resource { get; set; } 16 | 17 | public string ChangeType { get; set; } 18 | 19 | public string ClientState { get; set; } 20 | 21 | public string NotificationUrl { get; set; } 22 | 23 | public DateTimeOffset? ExpirationDateTime { get; set; } 24 | 25 | public string Error { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/UpdateAlertResultItemModel.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | namespace MicrosoftGraph_Security_API_Sample.Models 8 | { 9 | public class UpdateAlertResultItemModel 10 | { 11 | public string Title { get; set; } 12 | 13 | public string Category { get; set; } 14 | 15 | public string Severity { get; set; } 16 | 17 | public string Status { get; set; } 18 | 19 | public string Feedback { get; set; } 20 | 21 | public string Provider { get; set; } 22 | 23 | public string AssignedTo { get; set; } 24 | 25 | public string Comments { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/UpdateAlertResultModel.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | namespace MicrosoftGraph_Security_API_Sample.Models 8 | { 9 | public class UpdateAlertResultModel 10 | { 11 | public string Error { get; set; } 12 | 13 | public string Id { get; set; } 14 | 15 | public UpdateAlertResultItemModel Before { get; set; } 16 | 17 | public UpdateAlertResultItemModel After { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/UserPictureModel.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | namespace MicrosoftGraph_Security_API_Sample.Models 8 | { 9 | public class UserPictureModel 10 | { 11 | public int? Height { get; set; } 12 | 13 | public int? Width { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/ViewModels/AlertResultItemModel.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using Microsoft.Graph; 8 | using System; 9 | 10 | namespace MicrosoftGraph_Security_API_Sample.Models 11 | { 12 | public class AlertResultItemModel 13 | { 14 | public string Id { get; set; } 15 | 16 | public string Title { get; set; } 17 | 18 | public string Severity { get; set; } 19 | 20 | public string Category { get; set; } 21 | 22 | public AlertStatus? Status { get; set; } 23 | 24 | public DateTimeOffset? CreatedDateTime { get; set; } 25 | 26 | public string Provider { get; set; } 27 | 28 | public string AssignedTo { get; set; } 29 | } 30 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/ViewModels/ManageAlertViewModel.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | namespace MicrosoftGraph_Security_API_Sample.Models.ViewModels 8 | { 9 | public class ManageAlertViewModel 10 | { 11 | public AlertDetailsViewModel CurrentAlert { get; set; } 12 | 13 | public UpdateAlertResultModel UpdateAlertResult { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/ViewModels/ResultQueriesViewModel.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using System.Web; 8 | 9 | namespace MicrosoftGraph_Security_API_Sample.Models.ViewModels 10 | { 11 | public class ResultQueriesViewModel 12 | { 13 | public ResultQueriesViewModel(string sdkQuery, string restQuery) 14 | { 15 | SDKQuery = HttpUtility.HtmlEncode(sdkQuery); 16 | RESTQuery = HttpUtility.HtmlEncode(restQuery); 17 | } 18 | 19 | public string SDKQuery { get; set; } 20 | 21 | public string RESTQuery { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Models/ViewModels/SecureScoreDetailsViewModel.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using MicrosoftGraph_Security_API_Sample.Models.DomainModels; 8 | using System.Collections.Generic; 9 | 10 | namespace MicrosoftGraph_Security_API_Sample.Models.ViewModels 11 | { 12 | public class SecureScoreDetailsViewModel 13 | { 14 | public SecureScoreModel TopSecureScore { get; set; } 15 | 16 | public IEnumerable SecureScoreControlProfiles { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Program.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using Microsoft.AspNetCore; 8 | using Microsoft.AspNetCore.Hosting; 9 | 10 | namespace MicrosoftGraph_Security_API_Sample 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateWebHostBuilder(args) 17 | .Build() 18 | .Run(); 19 | } 20 | 21 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 22 | WebHost.CreateDefaultBuilder(args) 23 | .UseStartup(); 24 | } 25 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Providers/IGraphServiceProvider.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using MicrosoftGraph_Security_API_Sample.Services.Interfaces; 8 | 9 | namespace MicrosoftGraph_Security_API_Sample.Providers 10 | { 11 | public interface IGraphServiceProvider 12 | { 13 | IGraphService GetService(string token); 14 | } 15 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Providers/ITokenProvider.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using Microsoft.Extensions.Caching.Memory; 8 | 9 | namespace MicrosoftGraph_Security_API_Sample.Providers 10 | { 11 | public interface ITokenProvider 12 | { 13 | string GetGraphTokenByIdToken(string idToken, IMemoryCache cache); 14 | } 15 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Services/ActionService.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using MicrosoftGraph_Security_API_Sample.Extensions; 8 | using MicrosoftGraph_Security_API_Sample.Services.Interfaces; 9 | using System; 10 | using System.Collections.Generic; 11 | using System.Linq; 12 | 13 | namespace MicrosoftGraph_Security_API_Sample.Services 14 | { 15 | public class ActionService : IActionService 16 | { 17 | public Dictionary> GetStatuses() 18 | { 19 | // Enum to List 20 | List statuses = Enum.GetNames(typeof(Microsoft.Graph.ActionState)).ToList(); 21 | 22 | return statuses.ToFilter("ActionStatuses", new List() { "None", "NotSupported" }); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Services/Interfaces/IActionService.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using System.Collections.Generic; 8 | 9 | namespace MicrosoftGraph_Security_API_Sample.Services.Interfaces 10 | { 11 | public interface IActionService 12 | { 13 | Dictionary> GetStatuses(); 14 | } 15 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Services/Interfaces/IAlertService.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using System.Collections.Generic; 8 | 9 | namespace MicrosoftGraph_Security_API_Sample.Services.Interfaces 10 | { 11 | public interface IAlertService 12 | { 13 | Dictionary> GetStatuses(); 14 | 15 | Dictionary> GetSeverities(); 16 | 17 | Dictionary> GetFeedbacks(); 18 | } 19 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/Services/Interfaces/INotificationService.cs: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // 5 | // ----------------------------------------------------------------------- 6 | 7 | using MicrosoftGraph_Security_API_Sample.Models; 8 | using System.Collections.Generic; 9 | 10 | namespace MicrosoftGraph_Security_API_Sample.Services.Interfaces 11 | { 12 | public interface INotificationService 13 | { 14 | void SendNotificationToClient(List messages); 15 | } 16 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "AzureAd": { 3 | "ClientId": "Enter_Your_Appid", 4 | "ClientSecret": "Enter_Your_AppSecret", 5 | "RedirectUri": "http://localhost:5000", 6 | "NotificationUri": "Enter_Your_URL/notifications/listen", 7 | "BaseUrl": "https://graph.microsoft.com/", 8 | "UrlVersion": "beta", 9 | "Scope": "https://graph.microsoft.com/.default", 10 | "Instance": "https://login.microsoftonline.com/", 11 | "Audience": "https://graph.microsoft.com" 12 | }, 13 | "UseMockFilters": false, 14 | "CacheTime": { 15 | "GetActions": 5, 16 | "ActionsFilters": 60, 17 | "GetAlerts": 5, 18 | "GetAlertById": 5, 19 | "AlertsFilters": 60, 20 | "Dashboard": 60, 21 | "GetSecureScores": 60, 22 | "GetSecureDetails": 60, 23 | "GetSubscriptions": 5 24 | }, 25 | "Logging": { 26 | "LogLevel": { 27 | "Default": "Debug", 28 | "System": "Information", 29 | "Microsoft": "Information" 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/appsettings.Production.json: -------------------------------------------------------------------------------- 1 | { 2 | "AzureAd": { 3 | "ClientId": "Enter_Your_Appid", 4 | "ClientSecret": "Enter_Your_AppSecret", 5 | "RedirectUri": "Enter_Your_URL", 6 | "NotificationUri": "Enter_Your_URL/notifications/listen", 7 | "BaseUrl": "https://graph.microsoft.com/", 8 | "UrlVersion": "beta", 9 | "Scope": "https://graph.microsoft.com/.default", 10 | "Instance": "https://login.microsoftonline.com/", 11 | "Audience": "https://graph.microsoft.com" 12 | }, 13 | "UseMockFilters": false, 14 | "CacheTime": { 15 | "GetActions": 5, 16 | "ActionsFilters": 60, 17 | "GetAlerts": 5, 18 | "GetAlertById": 5, 19 | "AlertsFilters": 60, 20 | "Dashboard": 60, 21 | "GetSecureScores": 60, 22 | "GetSecureDetails": 60, 23 | "GetSubscriptions": 5 24 | }, 25 | "publishOptions": { 26 | "include": [ 27 | "Views", 28 | "appsettings*.json" 29 | ] 30 | } 31 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/MicrosoftGraph_Security_API_Sample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/1.dashboardcollapsed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/1.dashboardcollapsed.png -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/2.dashboardexpanded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/2.dashboardexpanded.png -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/3.alertslist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/3.alertslist.png -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/4.alertdetails.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/4.alertdetails.png -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/5.managealert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/5.managealert.png -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/6.invokeaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/6.invokeaction.png -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/7.actionslist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/7.actionslist.png -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/8.subscriptionslist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/8.subscriptionslist.png -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/9.securescore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/9.securescore.png -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/ActiveSubscriptions.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/ActiveSubscriptions.PNG -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/AdminConsent.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/AdminConsent.PNG -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/GrantError.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/GrantError.png -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/NotificationPage.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/NotificationPage.JPG -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/Scope.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/Scope.PNG -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/SecurityRole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/SecurityRole.png -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/UI1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/UI1.JPG -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/VSSettings.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/VSSettings.JPG -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/ngrok.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/ngrok.JPG -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/ngrok1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/ngrok1.PNG -------------------------------------------------------------------------------- /Samples/aspnet-angular/readme-images/ngrok2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/securitydev/22d3b539744bba1b9ddba42f106d8cddf803a0b7/Samples/aspnet-angular/readme-images/ngrok2.PNG --------------------------------------------------------------------------------