External file sharing

Vishnu Anand 250 Reputation points
2025-02-26T12:05:09.09+00:00

When sharing the file with an external Gmail account, it asks for a security code to access the file. However, when sharing the same file with an external Microsoft account, it allows access without any security key. What could be the reason behind this, and how can I fix it?

this is my settings: image

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,367 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 39,281 Reputation points Microsoft Vendor
    2025-02-27T07:10:17.5233333+00:00

    Hi @Vishnu Anand,

    New and existing guests scope sharing will require people who have received invitations to sign in with their work or school account (if their organization uses Microsoft 365) or a Microsoft account, or to provide a code to verify their identity. Users can share with guests already in your organization's directory, and they can send invitations to people who will be added to the directory if they sign in.

    If you share with a person who isn't in the directory(i.e., Gmail.com, Yahoo.com, etc.), they're sent a one-time code that they can use to verify their identity. See Secure external sharing in SharePoint

    Depending on the security it turns out to be a by-design one. We are unable to disable code verification. As a workaround, you could set the sharing scope to anyone

    Screenshot of external sharing settings.

    This setting will allow users to share files and folders by using links that let anyone who has the link access the files or folders without authenticating.


    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 Answers by the question author, which helps users to know the answer solved the author's problem.