You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example retrieves all service principals from the directory.
19
19
20
-
To learn about other permissions for this resource, see the [permissions reference](/graph/permissions-reference).
20
+
To learn about the permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#applicationreadall).
21
21
22
-
To consent to any of these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
22
+
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
23
23
24
24
### Example 2: Get the service principal by display name
25
25
26
26
```powershell
27
27
Connect-MgGraph -Scopes 'Application.Read.All'
28
28
Get-MgServicePrincipal -Filter "DisplayName eq 'Power BI Service'" |
29
-
Format-List Id, DisplayName,AppId, SignInAudience
29
+
Format-List Id, DisplayName,AppId, SignInAudience
30
30
31
31
Id : 9518fb8f-8d9e-4aae-be20-d398f9cc59ac
32
32
DisplayName : Power BI Service
33
33
AppId : 60dbf324-9702-41cc-a5fa-f8d19804b014
34
34
SignInAudience : AzureADMultipleOrgs
35
35
```
36
36
37
-
This example gets the service principal by display name.
37
+
This example gets the service principal by the display name.
38
38
39
-
To learn about other permissions for this resource, see the [permissions reference](/graph/permissions-reference).
39
+
To learn about the permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#applicationreadall).
40
40
41
-
To consent to any of these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
41
+
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
42
42
43
43
### Example 3: Get a count of the service principals
44
44
@@ -54,11 +54,11 @@ Id DisplayName
54
54
020ada9b-60b7-436f-8f00-22b198c2996a O365SBRM Service 9d06afd9-66c9-49a6-b385-ea7509332b0b AzureADMultipleOrgs Microsoft Service
55
55
```
56
56
57
-
This example returns a list of all the service principals. $spCount variable contains the count of the objects in the result. Advanced query requires the ConsistencyLevel parameter set to `eventual` and the Count parameter in the command. For more information about *ConsistencyLevel* and *Count*, see [Advanced query capabilities on Azure AD directory objects](/graph/aad-advanced-queries).
57
+
This example returns a list of all the service principals. $spCount variable contains the count of the objects in the result. The advanced query requires the ConsistencyLevel parameter set to `eventual` and the Count parameter in the command. For more information about *ConsistencyLevel* and *Count*, see [Advanced query capabilities on Azure AD directory objects](/graph/aad-advanced-queries).
58
58
59
-
To learn about other permissions for this resource, see the [permissions reference](/graph/permissions-reference).
59
+
To learn about other permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#applicationreadall).
60
60
61
-
To consent to any of these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
61
+
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
62
62
63
63
### 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
64
64
@@ -75,11 +75,11 @@ Id DisplayName AppId
75
75
1d322ee1-7cf7-442a-b480-d6d4bbe6ec54 App Protection c6e44401-4d0a-4542-ab22-ecd4c90d28d7 AzureADMultipleOrgs Microsoft Services
76
76
```
77
77
78
-
This example filters service principals whose display name starts with 'a' and continues to return the top 5. $spCount variable contains the count of the objects in the result before the *Top* filter. Advanced query requires the ConsistencyLevel parameter set to `eventual` and the Count parameter in the command. For more information about *ConsistencyLevel* and *Count*, see [Advanced query capabilities on Azure AD directory objects](/graph/aad-advanced-queries).
78
+
This example filters service principals whose display name starts with 'a' and continues to return the top 5. $spCount variable contains the count of the objects in the result before the *Top* filter. The advanced query requires the ConsistencyLevel parameter set to `eventual` and the Count parameter in the command. For more information about *ConsistencyLevel* and *Count*, see [Advanced query capabilities on Azure AD directory objects](/graph/aad-advanced-queries).
79
79
80
-
To learn about other permissions for this resource, see the [permissions reference](/graph/permissions-reference).
80
+
To learn about the permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#applicationreadall).
81
81
82
-
To consent to any of these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
82
+
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
83
83
84
84
### Example 5: Use -Search to get service principals with display names that contain the letters 'Team' including a count of returned objects
85
85
@@ -98,8 +98,8 @@ Id DisplayName
98
98
349be45f-663d-428e-bdab-b4ac26393614 Microsoft Teams AuthSvc a164aee5-7d0a-46bb-9404-37421d58bdf7 AzureADMultipleOrgs Microsoft Services
99
99
```
100
100
101
-
This example returns all service principals whose display name contains the word 'team'. $spCount variable contains the count of the objects in the result. Advanced query requires the ConsistencyLevel parameter set to `eventual` and the Count parameter in the command. For more information about *ConsistencyLevel* and *Count*, see [Advanced query capabilities on Azure AD directory objects](/graph/aad-advanced-queries).
101
+
This example returns all service principals whose display name contains the word 'team'. $spCount variable contains the count of the objects in the result. The advanced query requires the ConsistencyLevel parameter set to `eventual` and the Count parameter in the command. For more information about *ConsistencyLevel* and *Count*, see [Advanced query capabilities on Azure AD directory objects](/graph/aad-advanced-queries).
102
102
103
-
To learn about other permissions for this resource, see the [permissions reference](/graph/permissions-reference).
103
+
To learn about the permissions for this resource, see the [Application permissions reference](/graph/permissions-reference#applicationreadall).
104
104
105
-
To consent to any of these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
105
+
To consent to these permissions run `Connect-MgGraph -Scopes Permission`. For example, `Connect-MgGraph -Scopes Application.Read.All, Application.ReadWrite.All`.
0 commit comments