List all EEEU and Anonymous links for SharePoint and OneDrive!

A colleague of mine asked me before the weekend if I knew if there was a way to list all Everyone Except External Users and Anonymous links for OneDrive for Business. He had written a PowerShell script but had some errors. I just had gotten access to the Azure OpenAI o1-preview model, and i gave it a thought, could this model help us create a usable script instead of starting on scratch? I gave the modell a description of what we wanted it to create, and had to go back and forward a couple times with telling it about errors I discovered when running the code. I also had to do some small edits my self to the script, but after a while I had a fully workable version by mostly just giving the model instructions. I even added so the script could get the links for all SharePoint sites too. I am amazed of how long AI has come, and how much time this saved me. The difference from GPT-3.5 to o1 is huge!

Before you run the script you need to create an Azure App Registration that has the Graph API rights Directory.Read.All, Files.Read.All and Sites.Read.All. Remember to create a secret also.

2 thoughts on “List all EEEU and Anonymous links for SharePoint and OneDrive!

    • If you look at line 20 its the name of a function, i just named it to look like a powershell command

      Like

Leave a comment