This post is about "anyone with the link" sharing in SharePoint and OneDrive. Our argument is that these links should be managed the way you manage passwords and other credentials, and that most organisations don't do that today.
An "anyone with the link" URL has these properties:
- It gives access to whoever has it.
- It doesn't identify the person using it.
- It never expires unless someone remembers to set an expiry date.
- Ordinary employees create it, thousands of times, without approval.
- It gets forwarded, pasted into chats, copied into tickets and stored in mailboxes you don't control.
- It keeps working after the account that created it is disabled.
- There is no record of who has used it.
If someone proposed a new kind of password with those properties, a security team would refuse it. In security terms it is a bearer credential: whoever holds it gets in, and nothing else is checked. A typical Microsoft 365 tenant has thousands of these links.
Why people don't think of links as credentials
There are understandable reasons for this.
Links are created in the sharing dialog, which is a tool for working together, and it doesn't look like a security screen. They are URLs, and people treat a URL as something you paste once and forget. Employees create them, so they never go through an approval process. And each one is small. One link to one document looks harmless.
The risk comes from the number of links and from time. Any single link is a reasonable decision. Ten thousand links are a different matter, when they were created over eight years by people who have since left and they point at documents that have since become sensitive. No single decision along the way was wrong.
It also helps to look at what each link type allows:
| Scope | Who can use it |
|---|---|
| Anyone | Anybody holding the URL. No sign-in. No identity recorded. |
| People in your organisation | Any employee with the URL, including people the sharer never considered. |
| Specific people | Named recipients, authenticated. The one that behaves like a permission. |
Only the third type is tied to a named person. The first two give access to a group of people. With the first type, you can't even list who is in that group.
What happens to links after an account is compromised
This is the most important point in the post, because it connects sharing links to account takeovers.
Suppose an attacker gets into a user's account. They read what they came for. Before the session ends, they create "anyone" links on the folders they are interested in.
You detect the compromise and respond correctly. You disable the account, revoke every session, reset the password and review the sign-ins.
The links keep working.
A sharing link is stored on the file or folder. It is not a permission that belongs to the account. So disabling the account that created it doesn't remove it, and revoking sessions doesn't affect it. The attacker no longer needs the stolen password, because they now have URLs that work without one.
This is the most common way an account incident continues after it has been declared closed. It is usually missed because incident checklists are written around the account. The account was compromised, so the account gets fixed. The things the attacker created during the session are left behind, and they look like ordinary sharing.
If your incident process doesn't include a step to list the links created while the account was compromised, you have this gap. Adding that step costs nothing, and it is the most valuable recommendation in this post.
The same applies to other things an attacker can create during a session: email forwarding rules, delegate access and application consents. All of them keep working after the account is disabled.
Why the number of links grows so fast
There are three reasons, and nobody is really in control of any of them.
Most people accept the default. Whatever your tenant's default link type is, most links will be of that type. If the default is organisation-wide, then most sharing in your organisation is organisation-wide, whatever your policy document says. This one setting probably decides what most of your links look like.
Links travel further than the original share. A link is sent to three people. One of them forwards it to a partner. Someone pastes it into a channel with two hundred members. It ends up in a ticket, a wiki, or an archived mailbox at another company. The person who shared it had three people in mind. The real number of people who can use it has no limit and can't be known, and none of this is visible in your tenant because it happens outside it.
The content changes after the link is created. Someone creates a link to a folder that holds a draft. Over the next two years, contracts, financial models and personal data are added to that folder. The link was fine when it was created. Nobody looked at it again, because nothing prompted anyone to.
The third reason does the most damage, and it is the best argument for expiry dates. Reviewing every link is not possible at scale. If links expire, a link that no longer matches its purpose only stays open for a limited time.
What to do about it
These steps work on a real tenant. They are ordered so that the most valuable and least disruptive come first.
1. Fix the default. Change the default link type so that new links are narrow, and set a default expiry on anonymous links. This doesn't change any existing link, and it stops the problem from growing. It takes a few minutes and has the biggest effect of anything on this list.
2. Find "anyone" links on files that contain sensitive data. The total number of links is large and alarming, but it doesn't tell you what to do. The useful list is the links of type "anyone" on content that carries sensitive data. That list is short and clear, and nobody will argue about it in a review meeting.
3. Find organisation-wide links on sensitive content. This list is longer but still manageable. It is usually the biggest single source of what Copilot surfaces during a rollout, because organisation-wide sharing is how people make things easy for colleagues.
4. Find links created by people who have left. Nobody owns them, nobody will miss them, and the person who could explain them is gone.
5. Find links that are never used. These were created long ago and nobody opens them. Removing access that nobody uses is the safest cleanup there is.
6. Give owners time to object. Removing many links at once can interrupt someone's work. It is better to announce the removals as proposals with a countdown, so that owners can object and urgent cases can be approved straight away. A cleanup done this way gets finished. A cleanup done with a script often gets rolled back after the first complaint.
The one number to track
One number shows whether this is under control: the count of "anyone" links on sensitive content.
It is more useful than the total link count because you can act on it. It is more reliable than a policy statement because it is measured in the tenant. It is also a good number to show a board. What a board wants to know is whether things are getting better, and the trend of this number shows that.
If the number goes down after each cleanup and then climbs back, your default settings are wrong. More cleanups will not fix that.
How 1Security does it
In 1Security, sharing links are listed as their own resource. You don't have to dig for them inside file permissions. You can filter them by scope, by expiry date, by whether they have a password, by who created them and by when they were created. So "everything created during this period" is a filter you apply, and you don't need an investigation to get it.
Links are also part of the permission graph. Access to a file can arrive through five paths, and a link is one of them. That means a link is included when we calculate who can effectively reach a file and what a compromised account could reach. When a user's access to a set of files is revoked, the links are handled as one of those paths. This is how you can verify that access was really removed.
The lists from the section above exist as policies with live counts, for example files with organisation-wide links and sensitive content, or sites that contain sensitive information and are shared with anyone. Each policy shows how many resources match right now, before you enable anything. You can see the size of the problem without committing to a fix.
The available fixes are removing links by scope, removing a user from a link, restricting sharing, setting an expiry on anonymous links and expiring external access. They run as native SharePoint operations, so everything is visible and reversible in the Microsoft admin centres. Each change waits in a review window first, seventy-two hours by default. During that time you can approve it, reject and snooze it, or let the time run out.
Frequently asked questions
Is anonymous sharing always bad? No. It is the right choice for material that is meant to be public, and for sharing with people who can't sign in to your tenant. The risk is that it is also the easiest option for everything else, so it gets used far more widely than intended.
Can I see who used a link? For anonymous links, not in a way that identifies a person. That is what makes them work like a password that anyone can use. It is also why they need an expiry date, because a review can't tell you who has them.
Won't expiry break things? It will break some things for a short time, and the person affected will share the file again. Compare that with a link created in 2019 to a folder that now holds contracts. A default expiry on new links breaks nothing, which is why it is the first change to make.
What about links created before we had a policy? They are most of the problem. Don't try to review all of them. Start with "anyone" links on sensitive content, because that list is short and nobody will dispute it.



