Specifies the ARM resource id of the user assigned managed service identity resource that
should be used to retrieve the access token.

@param identityId the ARM resource id of the user assigned identity resource
@return MSICredentials
199280
@Beta
    public MSICredentials withIdentityId(String identityId) {
        this.identityId = identityId;
        this.clientId = null;
        this.objectId = null;
        return this;
    }
713991
def list_nics(access_token, subscription_id):
    '''
    '''
    endpoint = ''.join([get_rm_endpoint(),
                        '/subscriptions/', subscription_id,
                        '/providers/Microsoft.Network/',
                        '/networkInterfaces?api-version=', NETWORK_API])
    return do_get(endpoint, access_token)
892268
public static vrid6_nsip_binding[] get(nitro_service service, Long id) throws Exception{
		vrid6_nsip_binding obj = new vrid6_nsip_binding();
		obj.set_id(id);
		vrid6_nsip_binding response[] = (vrid6_nsip_binding[]) obj.get_resources(service);
		return response;
	}
176426
public static vrid[] get(nitro_service service) throws Exception{
		vrid obj = new vrid();
		vrid[] response = (vrid[])obj.get_resources(service);
		return response;
	}
261133
public static linkset_interface_binding[] get(nitro_service service, String id) throws Exception{
		linkset_interface_binding obj = new linkset_interface_binding();
		obj.set_id(id);
		linkset_interface_binding response[] = (linkset_interface_binding[]) obj.get_resources(service);
		return response;
	}
875102
public static vrid6_binding get(nitro_service service, Long id) throws Exception{
		vrid6_binding obj = new vrid6_binding();
		obj.set_id(id);
		vrid6_binding response = (vrid6_binding) obj.get_resource(service);
		return response;
	}
255939
private RoleSet rolesForAccessId(String accessId) {
        RoleSet roles = getRoleSet(accessIdToRoles, accessId);
        if (roles == null) {
            return findRolesForAccessId(accessId);
        } else {
            return roles;
        }
    }
19922
public function setResourceIdentity(ResourceIdentity $identity): void
    {
        if ($this->resourceIdentity !== null) {
            throw new RuntimeException('The resource identity has already been set.');
        }

        $this->resourceIdentity = $identity;
    }
477923
public static boolean isServerAccessId(String accessId) {
        return isAccessId(accessId) && accessId.startsWith(AccessIdUtil.TYPE_SERVER + AccessIdUtil.TYPE_SEPARATOR);
    }
410511
protected function getAuthorizationInfo(IdentityInterface $identity): AuthorizationInfoInterface
    {
        foreach ($this->getRealms() as $realm) {
            $info = $realm->getAuthorizationInfo($identity);
            if ($info instanceof AuthorizationInfoInterface) {
                return $info;
            }
        }

        return new AuthorizationInfo();
    }
1044754
public function getAccounts(string $nodeId, ?string $blockId = null): GetAccountsResponse
    {
        $node = hexdec($nodeId);
        $command = new GetAccountsCommand($node, $blockId);
        $response = $this->driver->executeCommand($command);

        return new GetAccountsResponse($response->getRawData());
    }
521113
public UserEntity findUserById(String userId) {
    checkAuthorization(Permissions.READ, Resources.USER, userId);
    return getDbEntityManager().selectById(UserEntity.class, userId);
  }
49490
public static UserInfo getUserInfo(final String userId) {

        if (userId == null) {
            throw new IllegalArgumentException("null userName");
        }

        try {
            Class<?> accessor = Class.forName("com.sap.security.um.service.UserManagementAccessor");
            if (accessor != null) {
                Object users = MethodUtils.invokeExactStaticMethod(accessor, "getUserProvider", null);
                if (users != null) {
                    Object user = MethodUtils.invokeExactMethod(users, "getUser", userId);
                    if (user != null) {
                        // get user name and email
                        return new User(
                                userId,
                                (String) MethodUtils.invokeExactMethod(user, "getAttribute", "firstname"),
                                (String) MethodUtils.invokeExactMethod(user, "getAttribute", "lastname"),
                                (String) MethodUtils.invokeExactMethod(user, "getAttribute", "email"));

                    }
                }
            }
        } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
            log.warn(e.getMessage());
        }
        return new User(userId, "", "", "");
    }
1236062
@Override
    public Set<IPortletEntity> getPortletEntitiesForUser(int userId) {
        final Set<IPortletEntity> portletEntities =
                this.delegatePortletEntityDao.getPortletEntitiesForUser(userId);
        return this.wrapEntities(portletEntities);
    }
1155949
public static vrid_interface_binding[] get(nitro_service service, Long id) throws Exception{
		vrid_interface_binding obj = new vrid_interface_binding();
		obj.set_id(id);
		vrid_interface_binding response[] = (vrid_interface_binding[]) obj.get_resources(service);
		return response;
	}
650192
def __GetAuthorizationTokenUsingResourceTokens(resource_tokens,
                                              path,
                                              resource_id_or_fullname):
    
    if resource_tokens and len(resource_tokens) > 0:
        # For database account access(through GetDatabaseAccount API), path and resource_id_or_fullname are '', 
        # so in this case we return the first token to be used for creating the auth header as the service will accept any token in this case
        if not path and not resource_id_or_fullname:
            return next(six.itervalues(resource_tokens))

        if resource_tokens.get(resource_id_or_fullname):
            return resource_tokens[resource_id_or_fullname]
        else:
            path_parts = []
            if path:
                path_parts = path.split('/')
            resource_types = ['dbs', 'colls', 'docs', 'sprocs', 'udfs', 'triggers',
                              'users', 'permissions', 'attachments', 'media',
                              'conflicts', 'offers']
            # Get the last resource id or resource name from the path and get it's token from resource_tokens
            for one_part in reversed(path_parts):
                if not one_part in resource_types and one_part in resource_tokens:
                    return resource_tokens[one_part]
    return None
355550
def get_resource_id(self):
        
        # Implemented from template for osid.resource.Resource.get_avatar_id_template
        if not bool(self._my_map['resourceId']):
            raise errors.IllegalState('this Authorization has no resource')
        else:
            return Id(self._my_map['resourceId'])