Skip to content

Commit 513d6c0

Browse files
Move Resources to main (#26173)
Co-authored-by: azure-powershell-bot <[email protected]>
1 parent d8ea26d commit 513d6c0

File tree

293 files changed

+27385
-1734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

293 files changed

+27385
-1734
lines changed

src/Resources/Authorization.Autorest/Az.Authorization.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@{
2-
GUID = '87ef2602-2a5d-4f33-8ec1-e58f24d6d474'
2+
GUID = '35a9c347-856c-41c9-9843-5dbaed8e4ef4'
33
RootModule = './Az.Authorization.psm1'
44
ModuleVersion = '0.1.0'
55
CompatiblePSEditions = 'Core', 'Desktop'

src/Resources/Authorization.Autorest/help/Az.Authorization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.Authorization
3-
Module Guid: 87ef2602-2a5d-4f33-8ec1-e58f24d6d474
3+
Module Guid: 35a9c347-856c-41c9-9843-5dbaed8e4ef4
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.authorization
55
Help Version: 1.0.0.0
66
Locale: en-US

src/Resources/MSGraph.Autorest/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ In this directory, run AutoRest:
4949
``` yaml
5050
version: "3.9.5"
5151
use-extension:
52-
"@autorest/powershell": "4.0.0-dev.12"
52+
"@autorest/powershell": "4.0.0-dev.13"
5353

5454
require:
5555
- $(this-folder)/../../readme.azure.noprofile.md

src/Resources/MSGraph.Autorest/generate-portal-ux.ps1

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,6 @@ if(-not $Isolated) {
2222
return
2323
}
2424

25-
$exportsFolder = Join-Path $PSScriptRoot 'exports'
26-
if(-not (Test-Path $exportsFolder)) {
27-
Write-Error "Exports folder '$exportsFolder' was not found."
28-
}
29-
30-
$directories = Get-ChildItem -Directory -Path $exportsFolder
31-
$hasProfiles = ($directories | Measure-Object).Count -gt 0
32-
if(-not $hasProfiles) {
33-
$directories = Get-Item -Path $exportsFolder
34-
}
35-
36-
$docsFolder = Join-Path $PSScriptRoot 'docs'
37-
if(Test-Path $docsFolder) {
38-
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
39-
}
40-
$null = New-Item -ItemType Directory -Force -Path $docsFolder -ErrorAction SilentlyContinue
41-
4225
$moduleName = 'Az.MSGraph'
4326
$rootModuleName = 'Az.Resources'
4427
if ($rootModuleName -eq "")
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
---
2+
external help file:
3+
Module Name: Az.Resources
4+
online version: https://learn.microsoft.com/powershell/module/az.resources/add-azadapppermission
5+
schema: 2.0.0
6+
---
7+
8+
# Add-AzADAppPermission
9+
10+
## SYNOPSIS
11+
Adds an API permission.
12+
13+
## SYNTAX
14+
15+
### ObjectIdParameterSet (Default)
16+
```
17+
Add-AzADAppPermission -ApiId <Guid> -ObjectId <Guid> -PermissionId <String> [-Type <String>]
18+
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
19+
```
20+
21+
### AppIdParameterSet
22+
```
23+
Add-AzADAppPermission -ApiId <Guid> -ApplicationId <Guid> -PermissionId <String> [-Type <String>]
24+
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
25+
```
26+
27+
## DESCRIPTION
28+
Adds an API permission.
29+
The list of available permissions of API is property of application represented by service principal in tenant.
30+
31+
For instance, to get available permissions for Graph API:
32+
* Azure Active Directory Graph: `Get-AzAdServicePrincipal -ApplicationId 00000002-0000-0000-c000-000000000000`
33+
* Microsoft Graph: `Get-AzAdServicePrincipal -ApplicationId 00000003-0000-0000-c000-000000000000`
34+
35+
Application permissions under the `appRoles` property correspond to `Role` in `-Type`.
36+
Delegated permissions under the `oauth2Permissions` property correspond to `Scope` in `-Type`.
37+
38+
User needs to grant consent via Azure Portal if the permission requires admin consent because Azure PowerShell doesn't support it yet.
39+
40+
## EXAMPLES
41+
42+
### Example 1: Add API Permission
43+
```powershell
44+
Add-AzADAppPermission -ObjectId 9cc74d5e-1162-4b90-8696-65f3d6a3f7d0 -ApiId 00000003-0000-0000-c000-000000000000 -PermissionId 5f8c59db-677d-491f-a6b8-5f174b11ec1d
45+
```
46+
47+
Add delegated permission "Group.Read.All" of Microsoft Graph API to AD Application (9cc74d5e-1162-4b90-8696-65f3d6a3f7d0)
48+
49+
### Example 2: Add API Permission
50+
```powershell
51+
Add-AzADAppPermission -ObjectId 9cc74d5e-1162-4b90-8696-65f3d6a3f7d0 -ApiId 00000003-0000-0000-c000-000000000000 -PermissionId 1138cb37-bd11-4084-a2b7-9f71582aeddb -Type Role
52+
```
53+
54+
Add application permission "Device.ReadWrite.All" of Microsoft Graph API to AD Application (9cc74d5e-1162-4b90-8696-65f3d6a3f7d0)
55+
56+
## PARAMETERS
57+
58+
### -ApiId
59+
The unique identifier for the resource that the application requires access to.
60+
This should be equal to the appId declared on the target resource application.
61+
62+
```yaml
63+
Type: System.Guid
64+
Parameter Sets: (All)
65+
Aliases:
66+
67+
Required: True
68+
Position: Named
69+
Default value: None
70+
Accept pipeline input: False
71+
Accept wildcard characters: False
72+
```
73+
74+
### -ApplicationId
75+
The application Id.
76+
77+
```yaml
78+
Type: System.Guid
79+
Parameter Sets: AppIdParameterSet
80+
Aliases:
81+
82+
Required: True
83+
Position: Named
84+
Default value: None
85+
Accept pipeline input: False
86+
Accept wildcard characters: False
87+
```
88+
89+
### -DefaultProfile
90+
The credentials, account, tenant, and subscription used for communication with Azure.
91+
92+
```yaml
93+
Type: System.Management.Automation.PSObject
94+
Parameter Sets: (All)
95+
Aliases: AzContext, AzureRmContext, AzureCredential
96+
97+
Required: False
98+
Position: Named
99+
Default value: None
100+
Accept pipeline input: False
101+
Accept wildcard characters: False
102+
```
103+
104+
### -ObjectId
105+
The unique identifier in Azure AD.
106+
107+
```yaml
108+
Type: System.Guid
109+
Parameter Sets: ObjectIdParameterSet
110+
Aliases:
111+
112+
Required: True
113+
Position: Named
114+
Default value: None
115+
Accept pipeline input: False
116+
Accept wildcard characters: False
117+
```
118+
119+
### -PermissionId
120+
The unique identifier for one of the oauth2PermissionScopes or appRole instances that the resource application exposes.
121+
122+
```yaml
123+
Type: System.String
124+
Parameter Sets: (All)
125+
Aliases:
126+
127+
Required: True
128+
Position: Named
129+
Default value: None
130+
Accept pipeline input: False
131+
Accept wildcard characters: False
132+
```
133+
134+
### -Type
135+
Specifies whether the id property references an oauth2PermissionScopes(Scope, delegated permission) or an appRole(Role, application permission).
136+
137+
```yaml
138+
Type: System.String
139+
Parameter Sets: (All)
140+
Aliases:
141+
142+
Required: False
143+
Position: Named
144+
Default value: None
145+
Accept pipeline input: False
146+
Accept wildcard characters: False
147+
```
148+
149+
### -Confirm
150+
Prompts you for confirmation before running the cmdlet.
151+
152+
```yaml
153+
Type: System.Management.Automation.SwitchParameter
154+
Parameter Sets: (All)
155+
Aliases: cf
156+
157+
Required: False
158+
Position: Named
159+
Default value: None
160+
Accept pipeline input: False
161+
Accept wildcard characters: False
162+
```
163+
164+
### -WhatIf
165+
Shows what would happen if the cmdlet runs.
166+
The cmdlet is not run.
167+
168+
```yaml
169+
Type: System.Management.Automation.SwitchParameter
170+
Parameter Sets: (All)
171+
Aliases: wi
172+
173+
Required: False
174+
Position: Named
175+
Default value: None
176+
Accept pipeline input: False
177+
Accept wildcard characters: False
178+
```
179+
180+
### CommonParameters
181+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
182+
183+
## INPUTS
184+
185+
## OUTPUTS
186+
187+
### System.Boolean
188+
189+
## NOTES
190+
191+
ALIASES
192+
193+
## RELATED LINKS
194+

0 commit comments

Comments
 (0)