website/integrations/device-management/apple/index.md
Apple Business Manager is a web-based portal for IT administrators, managers, and procurement professionals to manage devices, and automate device enrollment.
Organizations using Apple Business Essentials can allow their users to authenticate into their Apple devices using their IdP credentials, typically their company email addresses.
:::info Apple Device Management Platforms
Apple packages their device management platform into three brands to cater to different audiences:
While this integration guide focuses on Business Manager, the instructions are applicable to all three platforms with minor changes to the terminology.
:::
This sequence diagram shows a high-level flow between the user's apple device, authentik, and Apple Business Manager.
sequenceDiagram
autonumber
participant User
participant authentik
participant Apple
User->>Apple: User sign-in via iCloud
Note over Apple: 🔍 Email domain is federated
Apple-->>authentik: Redirect to authentik
Note over authentik: ✅ Authenticate
authentik-->>Apple: Identity verified
Apple-->>User: Device enrolled!
In short, Apple Business Manager recognizes the email domain as a federated identity provider controlled by authentik. When a user signs in with their email address, Apple redirects them to authentik for authentication. Once authenticated, Apple enrolls the user's device and grants access to Apple services.
By the end of this integration, your users will be able to enroll their Apple devices using their authentik credentials.
You'll need to have an authentik instance running and accessible on an HTTPS domain, and an Apple Business Manager user with the role of Administrator or People Manager.
:::warning Caveats
Be aware that Apple Business Manager imposes the following restrictions on federated authentication:
:::
The following placeholders are used in this guide:
authentik.company: The FQDN of the authentik installation.The workflow to configure authentik as an identity provider for Apple Business Manager involves creating scope mappings, signing keys, a Shared Signals Framework provider, and a OIDC provider/application pair.
Together, these components will handle the authentication flow and backchannel communication between authentik and Apple Business Manager.
Apple Business Manager requires that we create three scope mappings for our OIDC provider:
From the authentik Admin interface, navigate to Customization > Property Mappings and click Create.
Select Scope Mapping and use the following values:
Name: Apple Business Manager profile
Scope Name: profile
Description: [optional] Set to inform user
Expression: Apple Business Manager requires both a given name and family name in the OIDC claim. The example expression below assumes that the user's name is formatted with the given name first, followed by the family name, delimited by a space.
Consider adjusting the expression to match the name format used in your organization.
given_name, _, family_name = request.user.name.partition(" ")
return {
"given_name": given_name,
"family_name": family_name,
}
Click Finish and confirm that new scope mapping is listed in the Property Mappings overview.
On the Property Mappings list, click Create.
Select Scope Mapping and use the following values:
Apple Business Manager ssf.readssf.readreturn {}Click Finish and confirm that new scope mapping is listed in the Property Mappings overview.
On the Property Mappings list, click Create.
Select Scope Mapping and use the following values:
Apple Business Manager ssf.managessf.managereturn {}Click Finish and confirm that new scope mapping is listed in the Property Mappings overview.
You will need to create Signing Key to sign Security Event Tokens (SET). This key is used to both sign and verify the SETs that are sent between authentik and Apple Business Manager.
You can either generate a new key or import an existing one.
From the Admin interface, navigate to System > Certificates
Click Generate, select Signing Key, and use the following values:
apple-business-managerClick Generate and confirm that the new key is listed in the Certificates overview.
Alternatively, you can use an existing key if you have one available.
From the Admin interface, navigate to System > Certificates.
Click Create and use the following values:
apple-business-managerClick Create and confirm that the new key is listed in the Certificates overview.
:::tip Keep your text editor ready
authentik will automatically generate the Client ID and Client Secret values for the new provider. You'll need these values when configuring Apple Business Manager.
You can always find your provider's generated values by navigating to Providers, selecting the provider by name, and clicking the Edit button.
:::
From the authentik Admin interface, navigate to Applications > Providers and click Create.
For the Provider Type select OAuth2/OpenID Provider, click Next, and use the following values.
Apple Business ManagerStricthttps://gsa-ws.apple.com/grandslam/GsService2/acsApple Business Manager ssf.manageApple Business Manager ssf.readApple Business Manager profileauthentik default OAuth Mapping: OpenID 'profile'Click Finish and confirm that Apple Business Manager is listed in the provider overview.
Navigate to Applications > Providers and click Apple Business Manager.
Copy the OpenID Configuration URL field to your text editor.
While the OIDC provider handles the authentication flow, you'll need to create a Shared Signals Framework provider to handle the backchannel communication between authentik and Apple Business Manager.
From the authentik Admin interface, navigate to Applications > Providers and click Create.
Select Shared Signals Framework Provider and use the following values. Any fields that can be left as their default values are omitted from the list.
Apple Business Manager SSF[Your Signing Key]days=30Click Finish and confirm that the new SSF provider is listed in the overview.
:::tip A Blank SSF Config URL is expected
Keep in mind the SSF Config URL will be blank until the SSF provider is assigned to an application as a backchannel provider. We'll return to collect this URL after creating the application.
:::
The authentik user you will use to test the stream connection to Apple Business Manager must either have the role of superuser or have permission to add streams to the SSF provider.
From authentik the Admin interface, navigate to Applications > Providers and click the Apple Business Manager SSF provider.
Click the Permissions tab, select User Object Permissions, and click Assign to new user.
In the User field, enter the object name of the test user performing the initial connection to Apple Business Manager.
Set the Add stream to SSF provider permission toggle to On
Click Assign and confirm that the user is listed in the User Object Permissions list.
From the authentik Admin interface, navigate to Applications > Applications, click Create, and use the following values:
abmApple Business ManagerApple Business Manager SSFClick Create and confirm that the application is listed in the overview page.
Navigate to Providers > Apple Business Manager SSF
SSF Config URL value to your text editor.Before proceeding to Apple Business Manager, let's go over the values that you have copied from authentik.
From the Apple Business Manager provider:
Client IDClient SecretOpenID Configuration URLFrom the Apple Business Manager SSF provider:
SSF Config URLWith these prerequisites in place, authentik is ready to act as an identity provider for Managed Apple Accounts.
Similar to a personal Apple account, a Managed Apple Account uses an email address to access Apple services and devices. What makes an Apple account managed is that the domain associated with the email address is owned and verified by an organization through an Apple Business Manager account.
By verifying the domain, Apple Business Manager will delegate ownership of any accounts with a matching email address to the organization, allowing for centralized management of devices, apps, and services.
From the Apple Business Manager dashboard, click your account name on the sidebar, then select Preferences.
From the Preferences page, select Managed Apple Accounts tab, click Add Domain and then provide your domain name. Apple will generate a DNS TXT record that you'll need to add to your domain's DNS settings.
Wait for DNS propagation and click Verify to complete the domain verification process.
A confirmation dialog will prompt you to lock your domain before you can proceed with the next steps.
:::warning Locking your domain affects all enrolled users
Locking your domain ensures that only your organization can use your domain for federated authentication.
Once locked, your enrolled users will not be able to access Apple services until you complete the next steps to configure federated authentication.
Only lock your domain when you're ready to proceed with the next steps.
:::
In the confirmation dialog, set the Lock Domain toggle to On and confirm that the domain displays as locked in the Managed Apple Accounts tab.
Optionally, you may choose to capture all accounts, which will convert all existing accounts with an email address in the federated domain to Managed Apple Accounts. You can also choose to capture all accounts at a later time when you're ready to manage all users in the domain.
:::danger Account capture is one-way migration
Choosing to capture all accounts will affect all users with an email address in the federated domain, regardless of their enrollment status or device ownership. Once captured, the accounts can't be reverted to personal Apple accounts – even if the domain is unlocked.
Only capture accounts if you're sure that every user in the domain should be managed by Apple Business Manager.
:::
From the Apple Business Manager dashboard, click your account name on the sidebar, then select Preferences.
From the Preferences page, select Managed Apple Accounts tab, and click Manage next to the domain you've verified.
In your domain's management dialog, ensure you understand the implications of capturing all accounts and then click Capture All Accounts.
Wait for Apple to complete the account capture process, and confirm that all accounts are now managed by Apple Business Manager.
You're now ready to configure federated authentication with authentik.
From the Apple Business Manager dashboard, click your account name on the sidebar, then select Preferences.
From the Preferences page, select Managed Apple Accounts tab, and click Get Started under the "User sign in and directory sync" section.
To define how you want users to sign in, choose Custom Identity Provider and click Continue.
On the Set up your Custom Identity Provider page, use the following values:
authentikYour Client IDYour Client SecretYour SSF Config URL with 443 portYour OpenID Config URL with 443 portClick Continue to begin Apple's verification of your configuration.
When prompted to authenticate through your authentik instance, provide your credentials and click Log In.
When the test finishes, click Done to complete the configuration.
If the connection test fails, your configuration may be incorrect. Here are some common issues to check:
443.If you're still having issues, check your authentik instance's log for any errors that might have occurred during the authentication process. If Apple can reach your authentik instance, you should see logs indicating Apple's attempts to test the authentication flow.
:::warning Administrators cannot use federated authentication
Apple Business Manager does not allow users with the role of Administrator, Site Manager, or People Manager to log in using federated authentication.
When creating test users, ensure that their role is set to Standard (or Student) to test federated authentication with authentik.
:::
From the Apple Business Manager dashboard, click Users on the sidebar, then click Add.
In the Add New User dialog, use the following values:
JessieLorem[email protected]StandardClick Save to create the user account, and then click Create Sign-In in the user's profile.
When prompted to choose a delivery method, select Create a downloadable PDF and CSV and click Continue. Note the temporary password provided on the next page, optionally downloading the PDF and CSV files for future reference.
Confirm the user is created from the authentik Admin interface by navigating to the Users page and searching for the account by their email address. Note that this may take a few minutes to synchronize.
Confirmed the test user in synchronized in authentik.
Open a private browsing window and navigate to the Apple Business Manager.
In the email field, provide the email address assigned to test user.
Submit the form to trigger the authentication flow.
You should be redirected to authentik for authentication and then back to Apple Business Manager to manage the test user's account.
If the test is successful, you'll be able to enroll the test user's device and access Apple services.