Empêcher les utilisateurs 0365 d’utiliser PowerApps et PowerAutomate [Solved]


Prevent 0365 users from using PowerApps and PowerAutomate

EN/FR

Les innombrables applications dans Office 365 et leurs interdépendances sont parfois complexes à comprendre. Dans le cadre d’un déploiement maitrisé les entreprises doivent selon moi fermer certaines fonctionnalités dans un premier temps. Dans le cas contraire, les utilisateurs vont commencer a bâtir des applications et des processus incontrôlés, qui ne seront pas supportés par les services internes.
Aujourd’hui, c’est au tour de l’application Lists que nous n’avons pas autorisé pour les utilisateurs Teams mais qui est accessible depuis l’interface Web . Quel rapport avec PowerApps et PowerAutomate ? attendez 5 minutes 😉

The countless applications in Office 365 and their interdependencies are sometimes complex to understand. In the context of a controlled deployment, companies should in my opinion close certain functionalities at first. Otherwise, users will start building uncontrolled applications and processes, which will not be supported by internal services.
Today it’s the turn of the Lists application that we haven’t authorized for Teams users but that is accessible from the web interface. What does this have to do with PowerApps and PowerAutomate? wait 5 minutes 😉

Dans l’environnement Microsoft Teams cette application n’est pas autorisée comme le montre le paramétrage suivant

In the Microsoft Teams environment this application is not allowed as the following setting shows

Mais elle apparait comme précisé ci dessous dans le portail de l’utilisateur.L’application Lists n’est a priori un souci, mais elle permet d’avoir accès à PowerApps et PowerAutomate et ce malgré que les fonctionnalités de licence soient désactivées pour l’utilisateur comme le montre la figure suivante

But it appears as shown below in the user’s portal. The Lists application is not a concern, but it allows access to PowerApps and PowerAutomate despite the fact that the licensing features are disabled for the user as shown in the following figure

En exécutant l’application Lists qui est présente sur le portail 0365 de l’utilisateur , ce dernier a accès aux fonctions PowerApps et PowerAutomate.

By running the Lists application on the user’s 0365 portal, the user has access to PowerApps and PowerAutomate functions.

Aussi étrange que cela puisse paraitre, même si les fonctionnalités Powerapp et Powerautomate sont désactivées, l’utilisateur y a quand même accès. c’est d’ailleurs le contraire avec MS projet voir https://unifiedit.wordpress.com/2022/12/28/0365-ms-project-des-licences-e5-activees-mais-pas-dacces/

J’aurais bien une solution pour bloquer l’accès de nos utilisateurs à PowerApps et PowerAutomate c’est de refuser l’accès aux deux urls que sont https://make.powerapps.com/ et https://make.powerautomate.com mais je me dis qu’il doit y avoir une autre solution pour empêcher les utilisateurs d’avoir accès à ces fonctionnalités sans passer par une interdiction d’URL. Et puis j’aimerai comprendre pour quelles raisons ces utilisateurs ont toujours accès a PowerApps et PowerAutomate alors que la fonctionnalité est désactivée au niveau de leur licence E5

As strange as it may seem, even if the PowerApp and PowerAutomate features are disabled, the user still has access to them. It is the opposite with MS project see https://unifiedit.wordpress.com/2022/12/28/0365-ms-project-des-licences-e5-activees-mais-pas-dacces/

I would have a solution to block the access of our users to PowerApps and PowerAutomate is to deny access to the two urls that are https://make.powerapps.com/ and https://make.powerautomate.com but I tell myself that there must be another solution to prevent users from having access to these features without going through a ban on URL. And I would like to understand why these users still have access to PowerApps and PowerAutomate when the functionality is disabled in their E5 license

Après avoir chercher un peu sur le Web, j’avoue que je n’ai pas trouvé grand chose de très clair. N’étant pas un expert PowerPlateform difficile de comprendre . par contre j’ai trouvé ceci dans les paramètres de l’admin de PowerPlatform https://admin.powerplatform.microsoft.com/tenantsettings

After searching a bit on the Web, I must admit that I didn’t find anything very clear. Not being a PowerPlateform expert, it’s hard to understand. However, I found this in the PowerPlatform admin settings https://admin.powerplatform.microsoft.com/tenantsettings

Dans les options attributions d’environnement de développeur et de production ainsi que de test, j’ai positionner les options à la valeur suivante en espérant que cela suffise pour restreindre l’utilisateur.
In the developer and production environment assignments and test options, I have set the options to the following value, hoping that this will be enough to restrict the user

Après 20 Minutes (il faut savoir être patient avec 0365) , visiblement cela n’a rien changé l’utilisateur peut toujours créer ses applications Powerapps et les publier !
After 20 minutes (you have to be patient with 0365), obviously it has not changed anything the user can still create his Powerapps applications and publish them!

30 Décembre 2022

Ayant ouvert un case au support technique j’ai eu une réponse officielle qui est la suivante  » Malheureusement, pour l’environnement par défaut, Microsoft n’est pas en mesure d’empêcher les utilisateurs de créer des applications, car la licence n’est pas vérifiée lors de la création des applications, mais seulement lors de l’exécution. L’environnement par défaut est conçu pour que tous les utilisateurs puissent y accéder, puisque le rôle de créateur d’environnement est requis. »

Having opened a case to technical support I got an official response which is as follows « Unfortunately, for the default environment, Microsoft is not able to prevent users from creating applications, as the license is not checked at application creation, but only at runtime. The default environment is designed for all users to access, since the environment creator role is required. »

Ceci étant dit il existe une autre méthode qui est la suivante mais dont les conséquences sur les autres applications ne sont pas déterminée. Si l’on souhaite empêcher totalement les utilisateurs de créer des applications, même dans l’environnement par défaut, il existe une option : supprimer leur capacité à utiliser tout type de licence avec Power Platform. Cela affectera tous les environnements et peut également affecter d’autres produits.

That said, there is another method which is the following but whose consequences on other applications are not determined. If we want to completely prevent users from creating applications, even in the default environment, there is an option: remove their ability to use any type of license with Power Platform. This will affect all environments and may also affect other products.

Restreindre complètement les utilisateurs à créer des applications en supprimant les droits d’inscription aux licences.
En tant qu’administrateur, vous pouvez supprimer les licences premium. Cependant, les utilisateurs peuvent toujours s’inscrire pour des licences gratuites ou d’essai et créer des applications dans l’environnement Default. Le moyen d’empêcher cela est de ne pas autoriser les utilisateurs à s’inscrire pour des essais.

Veuillez noter que lorsque vous (en tant qu’administrateur) prenez ces mesures, cela supprimera toute licence d’essai existante des types particuliers que vous avez déjà spécifiés pour les utilisateurs de votre Tenant. Par conséquent, avant d’agir, vous devez prendre note des utilisateurs auxquels des licences d’essai ont déjà été attribuées (enregistrez l’ID de l’objet utilisateur et l’ID de la licence), afin de pouvoir les réattribuer ultérieurement si nécessaire.

Utilisez la cmdlet Admin PowerShell Remove-AllowedConsentPlans pour supprimer et bloquer les licences d’essai d’un type particulier.
Si vous souhaitez bloquer toutes les licences d’essai et n’autoriser aucune autre affectation, vous pouvez spécifier de supprimer les deux types « Viral » et « Interne ».
Si vous souhaitez profiter de la nouvelle fonctionnalité qui vous permet de continuer à attribuer des plans vous-même, vous devez uniquement supprimer le type « Interne ».
Veillez à installer la dernière version du module d’administration PowerShell Power Apps en utilisant Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force.

Désactivez le paramètre Azure Active Directory « AllowAdHocSubscriptions » dans votre Tenant. Cela empêchera les utilisateurs de s’attribuer des licences par le biais de l’AAD. Vous trouverez plus d’informations à ce sujet ici : Inscription en libre-service pour les utilisateurs vérifiés par courriel – Azure AD | Microsoft Docs

Si seul « Internal » a été supprimé à l’étape 2, l’administrateur du Tenant peut maintenant attribuer des licences d’essai aux utilisateurs comme bon lui semble. À ce stade, vous pouvez également rajouter des licences pour les utilisateurs enregistrés au début. Cela ne peut pas être fait via PowerShell, mais cela peut être fait via AAD ou le portail Office Admin.

Exemple d’utilisation des cmdlets mentionnés ci-dessus
Commencez par installer la dernière version du module :


Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force

Maintenant, les plans internes peuvent être supprimés à l’aide de la commande :


Remove-AllowedConsentPlans -Types « Internal » (Supprimer les plans autorisés)

Si vous souhaitez autoriser à nouveau un type de plan particulier, vous pouvez utiliser la commande :


Add-AllowedConsentPlans -Types « Internal » (Ajouter les plans de consentement autorisés – Types « internes »)

Si vous voulez voir les types de plans de consentement actuellement autorisés dans le Tenant, utilisez la commande :
Get-AllowedConsentPlans

Completely restrict users from creating applications by removing license fees.
As an administrator, you can remove premium licenses. However, users can still sign up for free or trial licenses and create applications in the Default environment. The way to prevent this is to not allow users to sign up for trials.

Please note that when you (as the administrator) take these actions, it will remove any existing trial licenses of the particular types you have already specified for your Tenant users. Therefore, before you act, you should take note of the users who have already been assigned trial licenses (record the user object ID and license ID), so that you can reassign them later if necessary.

Use the Admin PowerShell Remove-AllowedConsentPlans cmdlet to remove and block trial licenses of a particular type.
If you want to block all trial licenses and not allow any other assignments, you can specify to remove both « Viral » and « Internal » types.
If you want to take advantage of the new feature that allows you to continue assigning plans yourself, you only need to delete the « Internal » type.
Be sure to install the latest version of the PowerShell Power Apps Administration module using Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force.

Disable the Azure Active Directory setting « AllowAdHocSubscriptions » in your Tenant. This will prevent users from assigning licenses to themselves through the AAD. More information on this can be found here: Self-Service Registration for Email Verified Users – Azure AD | Microsoft Docs

If only « Internal » was removed in step 2, the Tenat administrator can now assign trial licenses to users as they see fit. At this point, you can also add licenses for users who were initially registered. This cannot be done via PowerShell, but it can be done via AAD or the Office Admin portal.

Example of using the above mentioned cmdlets
Start by installing the latest version of the module:

Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force

Now the internal plans can be removed with the command :

Remove-AllowedConsentPlans -Types « Internal ».

If you want to allow a particular type of plan again, you can use the command :

Add-AllowedConsentPlans -Types « Internal ».

If you want to see the types of consent plans currently allowed in the Tenant, use the command:
Get-AllowedConsentPlans

Laisser un commentaire