mirror of
https://github.com/fleetdm/fleet
synced 2026-05-14 20:48:35 +00:00
_Note - currently feature flagged. Build frontend with `ALLOW_CONDITIONAL_ACCESS=true NODE_ENV=development yarn run webpack --progress --watch` to enable this feature. Also, all of this functionality depends on the new `config.license.managed_cloud` being true, so you'll need to mock that data somehow. [This branch](https://github.com/fleetdm/fleet/tree/27043-fake-data) has the appropriate fake data for testing_ ## For #27043, #27864 ### Build front end for Fleet's integration with Microsoft Entra, allowing conditional preventtion of single sign-on for hosts failing any policies on a team #### Trigger the integration  #### Triggered, but configuration still not verified <img width="1348" alt="√ not-verified-return-to-prefilled-form" src="https://github.com/user-attachments/assets/44d0c21f-2554-40a8-9158-d1107cff2d09" /> #### Verified, short and long tenant ids:  #### Verified –> Deleted  #### Enable for policies of a team  #### Activities <img width="886" alt="√ activities" src="https://github.com/user-attachments/assets/d21e6185-c2f2-40b2-9c69-9b92fab58766" /> #### Unavailable for self-hosted Fleet instances:  #### Premium only  - [x] Changes file added for user-visible changes in `changes/` - [x] Added/updated automated tests - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [ ] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
28 lines
887 B
TypeScript
28 lines
887 B
TypeScript
import sendRequest from "services";
|
|
|
|
import endpoints from "utilities/endpoints";
|
|
|
|
export type TriggerMSConditionalStatusResponse = {
|
|
microsoft_authentication_url: string;
|
|
};
|
|
export type ConfirmMSConditionalAccessResponse = {
|
|
configuration_completed: boolean;
|
|
};
|
|
|
|
const conditionalAccessService = {
|
|
triggerMicrosoftConditionalAccess: (
|
|
msTenantId: string
|
|
): Promise<TriggerMSConditionalStatusResponse> => {
|
|
return sendRequest("POST", endpoints.CONDITIONAL_ACCESS_MICROSOFT, {
|
|
microsoft_tenant_id: msTenantId,
|
|
});
|
|
},
|
|
confirmMicrosoftConditionalAccess: (): Promise<ConfirmMSConditionalAccessResponse> => {
|
|
return sendRequest("POST", endpoints.CONDITIONAL_ACCESS_MICROSOFT_CONFIRM);
|
|
},
|
|
deleteMicrosoftConditionalAccess: () => {
|
|
return sendRequest("DELETE", endpoints.CONDITIONAL_ACCESS_MICROSOFT);
|
|
},
|
|
};
|
|
|
|
export default conditionalAccessService;
|