|
| 1 | +--- |
| 2 | +title: Azure AD to Microsoft Graph migration changes in Azure PowerShell |
| 3 | +description: This migration guide contains a list of Azure PowerShell changes for the Azure AD to Microsoft Graph migration in Az.Resources 5.0.0-preview. |
| 4 | +ms.devlang: powershell |
| 5 | +ms.topic: conceptual |
| 6 | +ms.date: 11/02/2021 |
| 7 | +ms.custom: devx-track-azurepowershell |
| 8 | +ms.service: azure-powershell |
| 9 | +--- |
| 10 | + |
| 11 | +# Azure AD to Microsoft Graph migration changes in Azure PowerShell |
| 12 | + |
| 13 | +The `Az.Resources` PowerShell module version 5.0.0-preview of Azure PowerShell introduces changes to |
| 14 | +the identity-related cmdlets. The cmdlets that rely on Azure AD Graph are transitioning to Microsoft |
| 15 | +Graph. This change is occurring to ensure a smooth transition in light of the |
| 16 | +[announcement of the retirement of Azure AD Graph](/updates/update-your-apps-to-use-microsoft-graph-before-30-june-2022/). |
| 17 | +For more information, see |
| 18 | +[Azure AD to Microsoft Graph migration for Azure command line tools](https://techcommunity.microsoft.com/t5/azure-tools/azure-ad-to-microsoft-graph-migration-for-azure-command-line/ba-p/2836666). |
| 19 | + |
| 20 | +The following example installs the latest preview version of the `Az.Resources` Azure PowerShell |
| 21 | +module. |
| 22 | + |
| 23 | +```azurepowershell |
| 24 | +Install-Module -Name Az.Resources -Repository PSGallery -Scope CurrentUser -AllowPrerelease |
| 25 | +``` |
| 26 | + |
| 27 | +See the following information for a list of changes. |
| 28 | + |
| 29 | +## Application |
| 30 | + |
| 31 | +### Get-AzAdApplication |
| 32 | + |
| 33 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory.PSADApplication` to |
| 34 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphApplication` |
| 35 | + |
| 36 | +- Parameter `IncludeTotalCount` is not supported and has been removed |
| 37 | + |
| 38 | +### New-AzAdApplication |
| 39 | + |
| 40 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory.PSADApplication` to |
| 41 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphApplication` |
| 42 | + |
| 43 | +- Parameter `Password` has been removed, customized password is not supported anymore, server |
| 44 | + assigns secret text when creation |
| 45 | + |
| 46 | +### Remove-AzAdApplication |
| 47 | + |
| 48 | +- Input type of parameter `InputObject` has been changed from |
| 49 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADApplication` to |
| 50 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphApplication` |
| 51 | + |
| 52 | +### Update-AzAdApplication |
| 53 | + |
| 54 | +- Input type of parameter `InputObject` has been changed from |
| 55 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADApplication` to |
| 56 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphApplication` |
| 57 | + |
| 58 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory.PSADApplication` to |
| 59 | + `System.Boolean` |
| 60 | + |
| 61 | +### Changes to Application Object |
| 62 | + |
| 63 | +- `ObjectId` has been replaced by `Id` |
| 64 | + |
| 65 | +- `HomePage` has been replaced by `HomepageUrl` in the `Web` element |
| 66 | + |
| 67 | +- `ApplicationId` has been replaced by `AppId` |
| 68 | + |
| 69 | +- `AvailableToOtherTenants` (boolean) has been replaced by `SignInAudience` (string with 4 values: |
| 70 | + 'AzureADMyOrg', 'AzureADMultipleOrgs', 'AzureADandPersonalMicrosoftAccount', |
| 71 | + 'PersonalMicrosoftAccount') |
| 72 | + |
| 73 | + - AzureADMultipleOrgs is equivalent to AvailableToOtherTenants:$true |
| 74 | + |
| 75 | + - AzureAdMyOrg is equivalent to AvailableToOtherTenants:$false or $null |
| 76 | + |
| 77 | +- `ApiPermissions` has been replaced by `RequiredResourceAccess` |
| 78 | + |
| 79 | +- `ReplyUrls` has been replaced by `RedirectUris ` in the `Web` element |
| 80 | + |
| 81 | +- `ObjectType` has been replaced by `OdataType` |
| 82 | + |
| 83 | +## Application Credential |
| 84 | + |
| 85 | +### Get-AzAdAppCredential |
| 86 | + |
| 87 | +- Input type of parameter `ApplicationObject` has been changed from |
| 88 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADApplication` to |
| 89 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphApplication` |
| 90 | + |
| 91 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory. PSADCredential` to |
| 92 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphKeyCredential` |
| 93 | + and `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordCredential` |
| 94 | + |
| 95 | +### New-AzAdAppCredential |
| 96 | + |
| 97 | +- Input type of parameter `ApplicationObject` has been changed from |
| 98 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADApplication` to |
| 99 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphApplication` |
| 100 | + |
| 101 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory. PSADCredential` to |
| 102 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphKeyCredential` |
| 103 | + and `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordCredential` |
| 104 | + |
| 105 | +- Parameter `Password` has been removed, customized password is not supported anymore, server will |
| 106 | + assign secret text when creation |
| 107 | + |
| 108 | +### Remove-AzAdAppCredential |
| 109 | + |
| 110 | +- Input type of parameter `ApplicationObject` has been changed from |
| 111 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADApplication` to |
| 112 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphApplication` |
| 113 | + |
| 114 | +## ServicePrincipal |
| 115 | + |
| 116 | +### Get-AzAdServicePrincipal |
| 117 | + |
| 118 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal` |
| 119 | + to `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphServicePrincipal` |
| 120 | + |
| 121 | +- Parameter `IncludeTotalCount` is not supported and has been removed. |
| 122 | + |
| 123 | +### New-AzAdServicePrincipal |
| 124 | + |
| 125 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal` |
| 126 | + to `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphServicePrincipal` |
| 127 | + |
| 128 | +- Parameter set `ApplicationWithoutCredentialParameterSet`, |
| 129 | + `ApplicationWithPasswordPlainParameterSet`, `DisplayNameWithoutCredentialParameterSet`, |
| 130 | + `DisplayNameWithPasswordPlainParameterSet` have been removed because those original parameter sets |
| 131 | + were not functioning. |
| 132 | + |
| 133 | +- Role `contributor` is not assigned as default when parameter `-Role` is not provided due to |
| 134 | + security consideration. |
| 135 | + |
| 136 | +### Remove-AzAdServicePrincipal |
| 137 | + |
| 138 | +- Input type of parameter `ApplicationObject` has been changed from |
| 139 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADApplication` to |
| 140 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphApplication` |
| 141 | + |
| 142 | +- Input type of parameter `InputObject` has been changed from |
| 143 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal` to |
| 144 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphServicePrincipal` |
| 145 | + |
| 146 | +### Update-AzAdServicePrincipal |
| 147 | + |
| 148 | +- Input type of parameter `InputObject` has been changed from |
| 149 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal` to |
| 150 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphServicePrincipal` |
| 151 | + |
| 152 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal` |
| 153 | + to `System.Boolean` |
| 154 | + |
| 155 | +### Changes to Service Principal Object |
| 156 | + |
| 157 | +- `ApplicationId` has been replaced by `AppId` |
| 158 | + |
| 159 | +- `ObjectType` has been replaced by `OdataType` |
| 160 | + |
| 161 | +## ServicePrincipal Credential |
| 162 | + |
| 163 | +### Get-AzAdSpCredential |
| 164 | + |
| 165 | +- Input type of parameter `ServicePrincipalObject` has been changed from |
| 166 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal` to |
| 167 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphServicePrincipal` |
| 168 | + |
| 169 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory. PSADCredential` to |
| 170 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphKeyCredential` |
| 171 | + and `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordCredential` |
| 172 | + |
| 173 | +### New-AzAdSpCredential |
| 174 | + |
| 175 | +- Input type of parameter `ServicePrincipalObject` has been changed from |
| 176 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal` to |
| 177 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphServicePrincipal` |
| 178 | + |
| 179 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory. PSADCredential` to |
| 180 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphKeyCredential` |
| 181 | + and `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordCredential` |
| 182 | + |
| 183 | +### Remove-AzAdSpCredential |
| 184 | + |
| 185 | +- Input type of parameter `ServicePrincipalObject` has been changed from |
| 186 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADServicePrincipal` to |
| 187 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphServicePrincipal` |
| 188 | + |
| 189 | +## User |
| 190 | + |
| 191 | +### Get-AzAdUser |
| 192 | + |
| 193 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory.PSADUser` to |
| 194 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser` |
| 195 | + |
| 196 | +- Parameter `IncludeTotalCount` is not supported and has been removed |
| 197 | + |
| 198 | +### New-AzAdUser |
| 199 | + |
| 200 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory.PSADUser` to |
| 201 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser` |
| 202 | + |
| 203 | +- Parameter `ImmutableId` is not supported and has been removed (It is a bug in current preview |
| 204 | + version. It should be added and equivalent to `OnPremisesImmutableId`) |
| 205 | + |
| 206 | +### Remove-AzAdUser |
| 207 | + |
| 208 | +- Input type of parameter `InputObject` has been changed from |
| 209 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADUser` to |
| 210 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser` |
| 211 | + |
| 212 | +### Update-AzAdUser |
| 213 | + |
| 214 | +- Input type of parameter `InputObject` has been changed from |
| 215 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADUser` to |
| 216 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphUser` |
| 217 | + |
| 218 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory.PSADUser` to |
| 219 | + `System.Boolean` |
| 220 | + |
| 221 | +### Changes to User Object |
| 222 | + |
| 223 | +- `ObjectType` has been replaced by `OdataType` |
| 224 | + |
| 225 | +- `ImmutableId` has been replaced by `OnpremisesImmutableId` |
| 226 | + |
| 227 | +## Group |
| 228 | + |
| 229 | +### Get-AzAdGroup |
| 230 | + |
| 231 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory.PSADGroup` to |
| 232 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphGroup` |
| 233 | + |
| 234 | +- Parameter `IncludeTotalCount` is not supported and has been removed |
| 235 | + |
| 236 | +### New-AzAdGroup |
| 237 | + |
| 238 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory.PSADGroup` to |
| 239 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphGroup` |
| 240 | + |
| 241 | +### Remove-AzAdGroup |
| 242 | + |
| 243 | +- Input type of parameter `InputObject` has been changed from |
| 244 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADGroup` to |
| 245 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphGroup` |
| 246 | + |
| 247 | +### Changes of Group Object |
| 248 | + |
| 249 | +- `ObjectType` has been replaced by `OdataType` |
| 250 | + |
| 251 | +## Group member |
| 252 | + |
| 253 | +### Get-AzAdGroupMember |
| 254 | + |
| 255 | +- Output type has been changed from `Microsoft.Azure.Commands.ActiveDirectory.PSADObject` to |
| 256 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphDirectoryObject` |
| 257 | + |
| 258 | +- Parameter `IncludeTotalCount` was removed |
| 259 | + |
| 260 | +- Input type of parameter `GroupObject` has been changed from |
| 261 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADGroup` to |
| 262 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphGroup` |
| 263 | + |
| 264 | +### Add-AzAdGroupMember |
| 265 | + |
| 266 | +- Input type of parameter `GroupObject` has been changed from |
| 267 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADGroup` to |
| 268 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphGroup` |
| 269 | + |
| 270 | +### Remove-AzAdGroupMember |
| 271 | + |
| 272 | +- Input type of parameter `GroupObject` has been changed from |
| 273 | + `Microsoft.Azure.Commands.ActiveDirectory.PSADGroup` to |
| 274 | + `Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphGroup` |
0 commit comments