@@ -29,6 +29,7 @@ import { CellDelegatedPrivilege } from 'src/components/tables/CellDelegatedPrivi
29
29
import Portals from 'src/data/portals'
30
30
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
31
31
import { Link } from 'react-router-dom'
32
+ import { TableModalButton } from 'src/components/buttons'
32
33
33
34
const Home = ( ) => {
34
35
const [ visible , setVisible ] = useState ( false )
@@ -54,6 +55,15 @@ const Home = () => {
54
55
params : { tenantFilter : currentTenant . defaultDomainName } ,
55
56
} )
56
57
58
+ const GlobalAdminList = useGenericGetRequestQuery ( {
59
+ path : '/api/ListGraphRequest' ,
60
+ params : {
61
+ tenantFilter : currentTenant . defaultDomainName ,
62
+ Endpoint : "/directoryRoles(roleTemplateId='62e90394-69f5-4237-9190-012177145e10')/members" ,
63
+ $select : 'displayName,userPrincipalName,accountEnabled' ,
64
+ } ,
65
+ } )
66
+
57
67
const {
58
68
data : sharepoint ,
59
69
isLoading : isLoadingSPQuota ,
@@ -192,14 +202,20 @@ const Home = () => {
192
202
</ CCol >
193
203
< CCol sm = { 12 } md = { 6 } xl = { 3 } className = "mb-3" >
194
204
< CippContentCard title = "Global Admin Users" icon = { faLaptopCode } >
195
- < a
196
- href = { `https://entra.microsoft.com/${ currentTenant . customerId } /#view/Microsoft_AAD_IAM/RoleMenuBlade/~/RoleMembers/objectId/62e90394-69f5-4237-9190-012177145e10/roleName/Global%20Administrator/roleTemplateId/62e90394-69f5-4237-9190-012177145e10/adminUnitObjectId//customRole~/false/resourceScope/%2F?culture=en-us&country=us` }
197
- className = "stretched-link"
198
- target = "_blank"
199
- />
200
- < div >
201
- { issuccessUserCounts && ! isFetchingUserCount ? dashboard ?. Gas : < Skeleton /> }
202
- </ div >
205
+ { GlobalAdminList . isSuccess ? (
206
+ < >
207
+ < TableModalButton
208
+ className = "stretched-link text-decoration-none"
209
+ data = { GlobalAdminList . data ?. Results }
210
+ countOnly = { true }
211
+ component = "a"
212
+ color = "link"
213
+ title = "Global Admins"
214
+ />
215
+ </ >
216
+ ) : (
217
+ < Skeleton />
218
+ ) }
203
219
</ CippContentCard >
204
220
</ CCol >
205
221
< CCol sm = { 12 } md = { 6 } xl = { 3 } className = "mb-3" >
0 commit comments