Thank you for reaching out to Microsoft Q&A.
In your scenario, the behavior you are observing is expected for a multi-tenant Microsoft Entra ID application integrated with Azure DevOps using OAuth (OBO flow). Testing with a separate sandbox tenant is a valid and recommended approach because each tenant in Entra ID acts as an isolated identity boundary, similar to how real external customer tenants operate. This setup correctly simulates cross-tenant authentication, token issuance, and service principal creation. However, when users from external tenants attempt to access the application, they are prompted for admin consent because the application is requesting permissions that require administrator approval. This is not an issue with your implementation but rather a result of Microsoft Entra ID’s default security model, where consent behavior is governed by both the permissions requested by the application and policies configured in the external tenant. Many organizations restrict user consent and require an administrator to approve apps before users can access them.
Refer below points to resolve this issue or this is the workaround
Sandbox tenant testing is valid and recommended
A separate tenant behaves exactly like a real customer tenant for authentication and authorization scenarios.
It accurately simulates multi-tenant login, token issuance, and consent behavior.
This is aligned with Microsoft guidance to use a dedicated test tenant for development and validation.
Admin consent prompt is expected behavior
External users see “Admin approval required” because the application requests permissions that cannot be granted by end users.
Consent experience depends on tenant policies and permission scope, not just application configuration.
Provide admin consent flow to customers (One-time setup)
Share a standard admin consent URL so tenant admins can approve the application once:
https://login.microsoftonline.com/{tenant-id}/v2.0/adminconsent
?client_id=<your-client-id>
&redirect_uri=<your-redirect-uri>
This uses the Microsoft Entra admin consent endpoint for tenant-wide approval.
Alternative: Portal-based admin approval
Admin can navigate to:
Entra ID → Enterprise Applications
Select your application
Go to Permissions → Click “Grant admin consent”
This grants access to all users in that tenant and removes further consent prompts.
Best practice to minimize friction
Request only least-privileged delegated permissions
Provide clear onboarding documentation for customer admins
Handle multi-tenant token validation properly (issuer, audience)