Facing AADSTS50079 while publishing to sharepoint with gulp, any resolutions?

Ishan Parekh 0 Reputation points
2024-11-15T06:42:15.7166667+00:00

I am trying to publish an angular application to sharepoint from local. My User has full control and I even created a service account to see if it works. However, I keep geting below mentioned error.

AADSTS50079: Due to a configuration change made by your administrator, or because you moved to a new location, you must enroll in multi-factor authentication to access ''

The full error trace loks like this,

Unhandled rejection Error: Error: <S:Fault>

<S:Code>

<S:Value>S:Sender</S:Value>

<S:Subcode>

  <S:Value>wst:FailedAuthentication</S:Value>

</S:Subcode>
```  </S:Code>

  <S:Reason>

```ruby
<S:Text xml:lang="en-US">Authentication Failure</S:Text>
```  </S:Reason>

  <S:Detail>

```xml
<psf:error xmlns:psf="http://schemas.microsoft.com/Passport/SoapServices/SOAPFault">

  <psf:value>0x800434D4</psf:value>

  <psf:internalerror>

    <psf:code>0x800434D4</psf:code>

    <psf:text>AADSTS50079: Due to a configuration change made by your administrator, or because you moved to a new location, you must enroll in multi-factor authentication to access &apos;&apos;.</psf:text>

  </psf:internalerror>

</psf:error>
```  </S:Detail>

</S:Fault>

Any resolution will be helpful here.

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,132 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ling Zhou_MSFT 19,550 Reputation points Microsoft Vendor
    2024-11-15T08:43:42.05+00:00

    Hi @Ishan Parekh,

    Thank you for posting in this community.

    First, don't know if you've turned on MFA for your tenant. It appears that Microsoft are currently running a campaign that switches on "security defaults" automatically. This is to force all users to setup MFA as this is far more secure.

    You can turn off MFA for users who publish your app:

    A user with Global Administrator permissions needs to do the following:

    • Visit https://entra.microsoft.com/ 
    • Click Identity > Overview > Properties
    • Under the 'Security Defaults' heading, click 'Manage security defaults'.
    • Change from 'Enabled' to 'Disabled'. This step disables MFA for all users.
    • Now in the navigation pane, click Users > All Users > Click on the other user who need MFA
    • Click 'Authentication methods', enter a phone number to use with MFA.

    After that see if the error still appears.

    Second, If the above doesn't work, please enable MFA again in ‘Manage security defaults’. There is another reason that may be contributing to this problem.

    The AADSTS50079 error indicates that multi-factor authentication (MFA) is required but not satisfied. This can occur if MFA is enabled for SharePoint but not for the Dataverse, or if there are other configuration issues. To resolve this, you should ensure that MFA is properly configured for both SharePoint and Dataverse.

    You can take steps in this article to configure it: SharePoint Document Grid warning AADSTS50076 or AADSTS50079.


    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.


  2. Ling Zhou_MSFT 19,550 Reputation points Microsoft Vendor
    2024-11-18T07:20:54.64+00:00

    Hi @Ishan Parekh,

    Thank you for your reply.

    I looked for information based on your reply, but I'm sorry to say that I didn't find a way to publish the angular application to SharePoint Online in MFA mode with the gulp command.

    I'm actually confused because we usually package the app into a .sppkg file via the gulp command and upload that file to the SharePoint App catalog. Gulp command doesn't involve authentication, only web authentication is performed when accessing the SharePoint App catalog. If so, MFA is not an issue.

    I suggest you try to package your app into a .sppkg file using the following command and upload it to SharePoint by uploading it to the SharePoint App Catalog.

    gulp bundle
    gulp package-solution
    

    The command creates the following package: ./sharepoint/solution/your-application.sppkg.

    If what I've described above doesn't work, we suggest you can create a new service request in the M365 admin center as an admin, where engineers can get more information than forums and solve your problems.

    User's image

    Please accept my sincerely apologize for any in convenience this may cause. Thank you for your kind understanding.


    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.

    0 comments No comments

Your answer

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