Cannot run Outlook Add-in application using Microsoft 365 Developer Sandbox Administrator account. "The request failed. The remote server returned an error: (401) Unauthorised.

MargieLC 1 Reputation point
2025-01-22T10:20:21.29+00:00

Hi,

I have an outlook add-in solution. When I run it it debug mode, It is asking me to provide account credentials.

"Please specify the credentials for the mailbox where the mail app will be registered for debugging. If you signed up for the Office 365 Developer subscription, then user your User ID as the email address.

First question, where can I find the User ID from my Office 365 Developer subscription.

Second, I tried to provide the administrator login details of the Sandbox I was provided, **********@.onmicrosoft.com. However, it is returning an error saying:

"The request failed. The remote server returned an error: (401) Unauthorized"

Does anyone experienced this same issue. I am quite at loss. I used to be able to run my code and then now, it is returning me these types of errors.

Any help and assistance will be greatly appreciated.

Microsoft 365 and Office | Development | Other
Outlook | Windows | Classic Outlook for Windows | For business
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChristyZhang-MSFT 26,186 Reputation points Microsoft External Staff
    2025-01-23T01:46:50.2333333+00:00

    Hi @MargieLC ,

    Welcome to our forum!

    Looks like your case is more related to the add-in development, please kindly understand that the Outlook tag here we mainly focus on general issues about Outlook desktop client. Based on my research, i found a similar thread mentioned th error "The request failed. The remote server returned an error: (401) Unauthorized", it's suggested that you could refer to the answer as SamRamon-6302 post:

    User's image

    More information: Error 401 when starting Outlook Web Add-in sample.

    Hope the above help! If it doesn't help, in order to better solve your problem, we will add "Office Development" tag. Thanks for your understanding and support!


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.