Passing Parameter to Get -BetaIdentity in PowerShell

We are trying to develop a poweshell script that will fetch all the available role and the role member details. Made use of the function Get-RoleAssignedIdentities whcih gives the required output, but it does not fetch the uid of the members. So for getting the identity details we are using functiona Get -BetaIdentity, and looks like the paramater passed to it is are not giving us the required results. Can anyone please help us with the parameter that can be passed to the function Get -BetaIdentity so that we can assign the output Identity attribute values to some variables.

Hello @DSucharita

I wonder if we can get the uid with Get-BetaIdentity

The below is the screenshot of the same , we can see these attributes ONLY.

The use case in the following case seems same . Report generation using powershell funtion - #2 by sidharth_tarlapally

Thanks for the response.
The attribute list displays only few of the attribute. If it has got the uid, i think we should be able to fetch it using something like.

$RoleMemberID = Get -BetaIdentity -Id $member.id
username = $RoleMemberID.attributes.uid

The snippet does not work through, any suggestions

Got It!

Hope this helps ! You will get uid this way .

Thanks for the update. I tried using the given command and put the output to a variable, but its coming null and the attribute/uid values are not read. Can you please help me with the snippet?