+
+ New Permissions Available
+ {Object.keys(newPermissions?.MissingPermissions).map((perm) => {
+ // translate appid to display name
+ var sp = servicePrincipals?.Results?.find(
+ (sp) => sp.appId === perm,
+ )
+ return (
+
+ {sp?.displayName}:{' '}
+ {Object.keys(newPermissions?.MissingPermissions[perm]).map(
+ (type) => {
+ return (
+ <>
+ {newPermissions?.MissingPermissions[perm][type]
+ .length > 0 && (
+
+ {type == 'applicationPermissions'
+ ? 'Application'
+ : 'Delegated'}{' '}
+ -{' '}
+ {newPermissions?.MissingPermissions[perm][type]
+ .map((p) => {
+ return p.value
+ })
+ .join(', ')}
+
+ )}
+ >
+ )
+ },
+ )}
+
+ )
+ })}
+
+