Powershell Teams & Authentification Basique


Depuis ce matin je rencontre des soucis de connexion depuis un environnement Powershell 7.2.2 en mode admin pour se connecter en Powershell sur l’environnement Microsoft. La connexion est effectuée convenablement sur l’environnement Microsoft Teams via une authentification moderne mais l’exécution d’une commande n’est pas possible et génère cette erreur.

Since this morning I am having problems connecting from a Powershell 7.2.2 environment in admin mode to connect in Powershell on the Microsoft environment. The connection is done properly on the Microsoft Teams environment via a modern authentication but the execution of a command is not possible and generates this error.

Get-CsTeamsMeetingPolicy: Connecting to remote server api.interfaces.records.teams.microsoft.com failed with the following error message : Le client WinRM ne peut pas traiter la demande. L’authentification de base est actuellement désactivée dans la configuration du client. Modifiez la configuration du client et renouvelez la demande. For more information, see the about_Remote_Troubleshooting Help topic.

Get-CsTeamsMeetingPolicy: Connecting to remote server api.interfaces.records.teams.microsoft.com failed with the following error message: The WinRM client cannot process the request. Basic authentication is currently disabled in the client configuration. Change the client configuration and retry the request. For more information, see the about_Remote_Troubleshooting

La configuration du coté client RM est la suivante:/ The RM client side configuration is as follows:

Effectivement la connexion basique est désactivée au niveau du poste de travail. Ce que l’on a du mal à comprendre c’est pour qu’elle raison cette connexion basique serait nécessaire alors même que Microsoft est en train de la supprimer de tous les workload 0365 !

Indeed the basic connection is disabled at the workstation level. What is hard to understand is why this basic connection would be necessary when Microsoft is removing it from all workloads 0365!

Le comportement est le même avec une autre version de powershell / The behavior is the same with another version of powershell

Un incident a été ouvert auprès des services Microsoft pour une réponse officielle / An incident has been opened with Microsoft Services for an official response

J’ai donc pris un autre poste avec lequel je me suis connecté et j’ai pu exécuter correctement la commande powershell commele montre la figure suivante / So I took another station with which I connected and I was able to execute the powershell command correctly as shown in the following figure

Du coup j’ai regardé la configuration du client WinRM sur ce poste. Et à ma grande surprise j’ai pu constater que je n’avais pas d’entrée WinRM\client / So I looked at the configuration of the WinRM client on this workstation. And to my great surprise I found that I had no WinRM client entry

J’ai donc décidé de remettre la configuration du poste qui ne fonctionnait pas sur le poste qui pouvait se connecter. Ne pouvant pas le faire sur le poste qui n’arrive pas à se connecter car ses entrées semblent directement gérées par GPO.

So I decided to put the configuration of the computer that was not working on the computer that could connect. Not being able to do it on the workstation that can’t connect because its entries seem to be directly managed by GPO.

Un petit reboot et on teste de nouveau. Après un reboot je me reconnecte donc et là c’est complétement dingue / A small reboot and we test again. After a reboot I reconnect and there it is completely crazy

Comme vous pouvez le voir certaines commandes fonctionnent mais pas d’autres. Incompréhensible ! . Cependant, ce qui est sûr c’est que ce sont bien les entrées que j’ai ajouté qui sont la cause de ce comportement.

Je vais donc modifier cette configuration pour permettre au client WinRM de faire de l’authentification basique. Vous savez, l’authentification basique, méthode d’authentification que nous devons supprimer et qui est en train d’être supprimer par Microsoft sur ses tenants.

Nouvelle configuration : AllowBasic=1

As you can see some commands work but not others. Incomprehensible! . However, what is sure is that the entries I added are the cause of this behavior. So I’m going to modify this configuration to allow the WinRM client to do basic authentication. You know, basic authentication, authentication method that we must remove and that is being removed by Microsoft on its Tenants.

New configuration: AllowBasic=1

Un redémarrage et l’on teste de nouveau / A reboot and we test again

CQFD ! cela fonctionne. C’est donc bien le paramètre AllowBasic=0 qui ne permet pas à certaines commande PowerShell de fonctionner. Comme quoi l’authentification basique a encore quelques jours devant elle.
it works. So it is indeed the AllowBasic=0 parameter that does not allow some PowerShell commands to work. This shows that basic authentication still has some days to go

Laurent TERUIN

Votre commentaire

Choisissez une méthode de connexion pour poster votre commentaire:

Logo WordPress.com

Vous commentez à l’aide de votre compte WordPress.com. Déconnexion /  Changer )

Image Twitter

Vous commentez à l’aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l’aide de votre compte Facebook. Déconnexion /  Changer )

Connexion à %s