question

OleFriisNielsen-0580 avatar image
0 Votes"
OleFriisNielsen-0580 asked OleFriisNielsen-0580 commented

Possibility of changing user settings in azure AD via graph api/powershell

I would like to change the user settings in azure via powershell/graph api/azure cli.

The settings I'm looking to change can be found in Azure AD -> User settings. (the 3 toggles that are found on the page)

azure-ad-graph
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

michev avatar image
1 Vote"
michev answered OleFriisNielsen-0580 commented

Some of these settings can be managed via the Graph api endpoints, via:

Authorization policy: https://docs.microsoft.com/en-us/graph/api/resources/authorizationpolicy?view=graph-rest-beta
Permission grant policy (for app consents): https://docs.microsoft.com/en-us/graph/api/resources/permissiongrantpolicy?view=graph-rest-beta

Via PowerShell, you can toggle the UsersPermissionToCreateLOBAppsEnabled and UsersPermissionToUserConsentToAppEnabled properties using Set-MsolCompanySettings.

Others are not available or coming in the future.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

For the first toggle, use Set-MsolCompanySettings -UsersPermissionToCreateLOBAppsEnabled, or via the Graph API - allowedToCreateApps - example #4 here: https://docs.microsoft.com/en-us/graph/api/authorizationpolicy-update?view=graph-rest-beta&tabs=http#example-4-disable-default-user-roles-permission-to-create-applications
The second one roughly translates to the "blockMsolPowerShell" setting in the same endpoint. This one is not exposed outside of the portal UI, afaik.

1 Vote 1 ·

What about the third one?

0 Votes 0 ·

Could I perhaps have you help me with examples of how to set the 3 toggles here?:

132373-capture2.png


0 Votes 0 ·
capture2.png (60.4 KiB)