Hot to copy azure AD user permissions to newly created or existing Azure AD user

How do we copy azure AD user permissions to newly created or existing Azure AD user?

Use security groups for permissions /roles -> make new user member of security group

Currently one user has 40 groups, I want to mirror those groups to another user, is there any simple way to it, instead adding one by one

You could script it, I don’t know if a built in way to base group membership on another user.

Okay let me try thanks