Prompt
What should I use for unattended bots and batch processing?
Latest observation
Nov 6, 2026
OpenAI APIWeb search: off
For unattended bots and batch processing, the usual choice is:
- App-only authentication using an app registration / service principal
- Grant it only the application permissions it needs
- Use client secret or, preferably, a certificate
- Better yet, if supported, use managed identity for Azure-hosted workloads
Recommended options
-
Managed Identity
Best if your bot/batch job runs in Azure. No secrets to manage. -
Service principal + certificate
Best general option for unattended automation outside Azure. -
Service principal + client secret
Simpler, but less secure than a certificate.
Avoid
- Delegated/user sign-in auth for unattended jobs
- Using a human account for automation
Rule of thumb
- Azure resource? Use Managed Identity
- Not Azure? Use App registration / service principal
- Need highest security? Use certificate-based auth
If you want, I can also help you choose between these based on your exact platform, like Microsoft Graph, SharePoint, Azure DevOps, or a custom API.