The problem I'm having is that if the Tenant is only using modern authentication as basic authentication has been disabled by Microsoft due to end of life how can one work around this, at the moment I'm getting the following error (Error: The request failed. The remote server returned an error: (401) Unauthorized. all required permissions are applied,
We did enable basic authentication on the client's tenant and this script did work but Microsoft has disabled it again and is now unable to re-enable basic authentication. now I'm stuck in a jam. if there is anyone that is able to update the script to use modern authentication or prove a new solution that will be great.