Hello Cyndi. Currently, Microsoft Forms only allows the “Set time duration” capability for when responses are limited to people in your organization. Once you switch the toggle to “Anyone can respond”, the timer disappears because Microsoft is unable to manage timing or auto-submit for anonymous respondents in most cases since they do in fact have several users and accounts over various organizations and affiliations.
There is, however, another approach: you could generate the form embedded in a Microsoft Sway or web page with a countdown timer. This wouldn’t auto-submit the form, but at least you direct the respondents to answer within the appropriate time span.
If you're distributing to respondents that you're aware of, you might switch to “Only people in my organization can respond” to enable a timer. If you do this, every respondent would get exactly 40 minutes and their responses get auto-submitted when their time runs out.
Here's the reference: Set a timer for forms or quizzes in Microsoft Forms
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Best regards,