Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates wrong Connect-MgBetaGraph to Connect-MgGraph #3002

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```powershell

Connect-MgBetaGraph -Scopes 'Application.ReadWrite.All'
Connect-MgGraph -Scopes 'Application.ReadWrite.All'

$appObjectId = 'eaf1e531-0d58-4874-babe-b9a9f436e6c3'

Expand Down Expand Up @@ -31,7 +31,7 @@ Add a password to an application that expires in six months from the current dat

```powershell

Connect-MgBetaGraph -Scopes 'Application.ReadWrite.All'
Connect-MgGraph -Scopes 'Application.ReadWrite.All'

$appObjectId = 'eaf1e531-0d58-4874-babe-b9a9f436e6c3'

Expand Down
20 changes: 10 additions & 10 deletions src/Applications/beta/examples/Get-MgBetaApplication.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Example 1: Get a list of applications

```powershell
Connect-MgBetaGraph -Scopes 'Application.Read.All'
Connect-MgGraph -Scopes 'Application.Read.All'
Get-MgBetaApplication |
Format-List Id, DisplayName, AppId, SignInAudience, PublisherDomain

Expand All @@ -16,12 +16,12 @@ This examples gets a list of all the applications.

To learn about other permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#application-resource-permissions).

To consent to any of these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
To consent to any of these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.

### Example 2: Get an application by Id

```powershell
Connect-MgBetaGraph -Scopes 'Application.Read.All'
Connect-MgGraph -Scopes 'Application.Read.All'
Get-MgBetaApplication -Filter "AppId eq '39b09640-ec3e-44c9-b3de-f52db4e1cf66'" |
Format-List Id, DisplayName, AppId, SignInAudience, PublisherDomain

Expand All @@ -35,12 +35,12 @@ This examples gets the application by the specified Id.

To learn about other permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#application-resource-permissions).

To consent to any of these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
To consent to any of these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.

### Example 3: Get a count of all applications

```powershell
Connect-MgBetaGraph -Scopes 'Application.Read.All'
Connect-MgGraph -Scopes 'Application.Read.All'
Get-MgBetaApplication -ConsistencyLevel eventual -Count appCount

Id DisplayName AppId SignInAudience PublisherDomain
Expand All @@ -56,12 +56,12 @@ This example gets a list of all applications. The $appCount variable contains th

To learn about other permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#application-resource-permissions).

To consent to any of these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
To consent to any of these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.

### Example 4: Use -Search to get all the applications whose display name contains 'Test' including a count of the returned users

```powershell
Connect-MgBetaGraph -Scopes 'Application.Read.All'
Connect-MgGraph -Scopes 'Application.Read.All'
Get-MgBetaApplication -ConsistencyLevel eventual -Count appCount -Search '"DisplayName:Test"'

Id DisplayName AppId SignInAudience PublisherDomain
Expand All @@ -74,12 +74,12 @@ This example returns all applications whose display name contains 'Test'. The $a

To learn about other permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#application-resource-permissions).

To consent to any of these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
To consent to any of these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.

### Example 5: Use -Filter to get all the applications with a display name that starts with 'New' including a count of the returned users, with the results ordered by display name

```powershell
Connect-MgBetaGraph -Scopes 'Application.Read.All'
Connect-MgGraph -Scopes 'Application.Read.All'
Get-MgBetaApplication -ConsistencyLevel eventual -Count appCount -Filter "startsWith(DisplayName, 'New')" -OrderBy DisplayName

Id DisplayName AppId SignInAudience PublisherDomain
Expand All @@ -92,4 +92,4 @@ This example returns all applications whose display name starts with 'New'. The

To learn about other permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#application-resource-permissions).

To consent to any of these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
To consent to any of these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
20 changes: 10 additions & 10 deletions src/Applications/beta/examples/Get-MgBetaServicePrincipal.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Example 1: Get all service principals from the directory

```powershell
Connect-MgBetaGraph -Scopes 'Application.Read.All'
Connect-MgGraph -Scopes 'Application.Read.All'
Get-MgBetaServicePrincipal

Id : 304ae362-7953-4d08-8e15-aeece4d01017c
Expand All @@ -19,12 +19,12 @@ This example retrieves all service principals from the directory.

To learn about other permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#applicationreadall).

To consent to these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.

### Example 2: Get the service principal by display name

```powershell
Connect-MgBetaGraph -Scopes 'Application.Read.All'
Connect-MgGraph -Scopes 'Application.Read.All'
Get-MgBetaServicePrincipal -Filter "DisplayName eq 'Power BI Service'" |
Format-List Id, DisplayName,AppId, SignInAudience

Expand All @@ -38,12 +38,12 @@ This example gets the service principal by display name.

To learn about other permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#applicationreadall).

To consent to these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.

### Example 3: Get a count of the service principals

```powershell
Connect-MgBetaGraph -Scopes 'Application.Read.All'
Connect-MgGraph -Scopes 'Application.Read.All'
Get-MgBetaServicePrincipal -ConsistencyLevel eventual -Count spCount

Id DisplayName AppId SignInAudience PublisherName
Expand All @@ -58,12 +58,12 @@ This example returns a list of all the service principals. $spCount variable con

To learn about other permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#applicationreadall).

To consent to these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.

### Example 4: Use -Filter and -Top to get five service principals with a display name that starts with 'a' including a count of returned objects

```powershell
Connect-MgBetaGraph -Scopes 'Application.Read.All'
Connect-MgGraph -Scopes 'Application.Read.All'
Get-MgBetaServicePrincipal -ConsistencyLevel eventual -Count spCount -Filter "startsWith(DisplayName, 'a')" -Top 5

Id DisplayName AppId SignInAudience PublisherName
Expand All @@ -79,12 +79,12 @@ This example filters service principals whose display name starts with 'a' and c

To learn about other permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#applicationreadall).

To consent to these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.

### Example 5: Use -Search to get service principals with display names that contain the letters 'Team' including a count of returned objects

```powershell
Connect-MgBetaGraph -Scopes 'Application.Read.All'
Connect-MgGraph -Scopes 'Application.Read.All'
Get-MgBetaServicePrincipal -ConsistencyLevel eventual -Count spCount -Search '"DisplayName:Team"'

Id DisplayName AppId SignInAudience PublisherName
Expand All @@ -102,4 +102,4 @@ This example returns all service principals whose display name contains the word

To learn about other permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#applicationreadall).

To consent to these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
20 changes: 10 additions & 10 deletions src/Groups/beta/examples/Get-MgBetaGroup.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Example 1: Get a list of groups

```powershell
Connect-MgBetaGraph -Scopes 'Group.Read.All'
Connect-MgGraph -Scopes 'Group.Read.All'
Get-MgBetaGroup |
Format-List Id, DisplayName, Description, GroupTypes

Expand All @@ -20,12 +20,12 @@ This example retrieves a list of groups.

To learn about the permissions for this resource, see the [Group permissions reference](/graph/permissions-reference#groupmemberreadall).

To consent to these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes GroupMember.Read.All, Group.Read.All`.
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes GroupMember.Read.All, Group.Read.All`.

### Example 2: Get a group by the display name

```powershell
Connect-MgBetaGraph -Scopes 'Group.Read.All'
Connect-MgGraph -Scopes 'Group.Read.All'
Get-MgBetaGroup -Filter "DisplayName eq 'Business Development'" |
Format-List Id, DisplayName, Description, GroupTypes

Expand All @@ -39,12 +39,12 @@ This example gets a group by the specified display name.

To learn about the permissions for this resource, see the [Group permissions reference](/graph/permissions-reference#groupmemberreadall).

To consent to these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes GroupMember.Read.All, Group.Read.All`.
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes GroupMember.Read.All, Group.Read.All`.

### Example 3: Get a count of all groups

```powershell
Connect-MgBetaGraph -Scopes 'Group.Read.All'
Connect-MgGraph -Scopes 'Group.Read.All'
Get-MgBetaGroup -ConsistencyLevel eventual -Count groupCount

Id DisplayName Description GroupTypes AccessType
Expand All @@ -62,12 +62,12 @@ The example gets a list of all groups. The $groupCount variable contains the cou

To learn about the permissions for this resource, see the [Group permissions reference](/graph/permissions-reference#groupmemberreadall).

To consent to these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes GroupMember.Read.All, Group.Read.All`.
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes GroupMember.Read.All, Group.Read.All`.

### Example 4: Use -Search to get all the groups whose display name contains 'Market' including a count of the returned users

```powershell
Connect-MgBetaGraph -Scopes 'Group.Read.All'
Connect-MgGraph -Scopes 'Group.Read.All'
Get-MgBetaGroup -ConsistencyLevel eventual -Count groupCount -Search '"DisplayName:Market"'

Id DisplayName Description GroupTypes AccessType
Expand All @@ -81,12 +81,12 @@ This example returns all groups whose display name contains 'Market'. The $group

To learn about other permissions for this resource, see the [Group permissions reference](/graph/permissions-reference#groupmemberreadall).

To consent to any of these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes GroupMember.Read.All, Group.Read.All`.
To consent to any of these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes GroupMember.Read.All, Group.Read.All`.

### Example 5: Use -Filter to get all the applications with a display name that starts with 'A' including a count of the returned users, with the results ordered by display name

```powershell
Connect-MgBetaGraph -Scopes 'Group.Read.All'
Connect-MgGraph -Scopes 'Group.Read.All'
Get-MgBetaGroup -ConsistencyLevel eventual -Count groupCount -Filter "startsWith(DisplayName, 'A')" -OrderBy DisplayName

Id DisplayName Description GroupTypes AccessType
Expand All @@ -100,4 +100,4 @@ This example returns all groups whose display name starts with 'A'. The $groupCo

To learn about other permissions for this resource, see the [Group permissions reference](/graph/permissions-reference#groupmemberreadall).

To consent to these permissions run `Connect-MgBetaGraph -Scopes Permission`. For example, `Connect-MgBetaGraph -Scopes GroupMember.Read.All, Group.Read.All`.
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes GroupMember.Read.All, Group.Read.All`.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Example 1: Get a list of all access packages

```powershell
Connect-MgBetaGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Connect-MgGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Get-MgBetaEntitlementManagementAccessPackage | Format-List

AccessPackageAssignmentPolicies :
Expand Down Expand Up @@ -46,7 +46,7 @@ This examples returns all access packages.
### Example 2: Get access package by Id

```powershell
Connect-MgBetaGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Connect-MgGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Get-MgBetaEntitlementManagementAccessPackage -AccessPackageId 'bc041fda-b3ba-41fc-b911-ca95f7aac656'| Format-List


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Example 1: Get all access package policy assignment policies

```powershell
Connect-MgBetaGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Connect-MgGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Get-MgBetaEntitlementManagementAccessPackageAssignmentPolicy | Format-List

AccessPackage : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAccessPackage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This example retrieves all access package assignment requests.
### Example 2: Get access package assignment request using the request id

```powershell
Connect-MgBetaGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Connect-MgGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Get-MgBetaEntitlementManagementAccessPackageAssignmentRequest -AccessPackageAssignmentRequestId 'c82bc0cd-4fbc-4492-8c75-54c41dc74803'| Format-List

AccessPackage : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAccessPackage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Example 1: Get a list of all access package catalogs

```powershell
Connect-MgBetaGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Connect-MgGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Get-MgBetaEntitlementManagementAccessPackageCatalog | Format-list

AccessPackageResourceRoles :
Expand All @@ -26,7 +26,7 @@ This command returns a list of all the access package catalogs.
### Example 2: Filter the access package catalogs by the display name

```powershell
Connect-MgBetaGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Connect-MgGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Get-MgBetaEntitlementManagementAccessPackageCatalog -Filter "DisplayName eq 'General'" | Format-List

AccessPackageResourceRoles :
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Example 1: Get catalog resources by catalog id

```powershell
Connect-MgBetaGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Connect-MgGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Get-MgBetaEntitlementManagementAccessPackageCatalogAccessPackageResource -AccessPackageCatalogId '54152ecb-c65d-47f2-8a4d-ba2732de0a7b' | Format-List

AccessPackageResourceEnvironment : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAccessPackageResourceEnvironment
Expand Down Expand Up @@ -42,7 +42,7 @@ This example returns all access package catalog resources for the specified cata
### Example 2: Use -Filter to get all catalog resources with the display name 'Marketing resources'

```powershell
Connect-MgBetaGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Connect-MgGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Get-MgBetaEntitlementManagementAccessPackageCatalogAccessPackageResource -AccessPackageCatalogId '54152ecb-c65d-47f2-8a4d-ba2732de0a7b' -Filter "DisplayName eq 'Marketing resources'" | Format-List

AccessPackageResourceEnvironment : Microsoft.Graph.PowerShell.Models.MicrosoftGraphAccessPackageResourceEnvironment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Example 1: Get catalog resource roles

```powershell
Connect-MgBetaGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Connect-MgGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Get-MgBetaEntitlementManagementAccessPackageCatalogAccessPackageResourceRole -AccessPackageCatalogId '54152ecb-c65d-47f2-8a4d-ba2732de0a7b' -Filter "originSystem eq 'AadGroup' and accessPackageResource/id eq '36d8d18f-b081-4867-acf5-4a8b893761e8'"

Id Description DisplayName OriginId OriginSystem
Expand All @@ -15,7 +15,7 @@ This example gets the resource roles for the specified catalog id and filtering
### Example 2: Extend the -Filter to get the resource roles with the display name 'Member'

```powershell
Connect-MgBetaGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Connect-MgGraph -Scopes 'EntitlementManagement.ReadWrite.All'
Get-MgBetaEntitlementManagementAccessPackageCatalogAccessPackageResourceRole -AccessPackageCatalogId '54152ecb-c65d-47f2-8a4d-ba2732de0a7b' -Filter "originSystem eq 'AadGroup' and accessPackageResource/id eq '36d8d18f-b081-4867-acf5-4a8b893761e8' and DisplayName eq 'Member'"

Id Description DisplayName OriginId OriginSystem
Expand Down
Loading
Loading