def by_service_principal_id(self,service_principal_id: str) -> ServicePrincipalItemRequestBuilder:
        """
        Provides operations to manage the collection of servicePrincipal entities.
        param service_principal_id: The unique identifier of servicePrincipal
        Returns: ServicePrincipalItemRequestBuilder
        """
        if service_principal_id is None:
            raise TypeError("service_principal_id cannot be null.")
        from .item.service_principal_item_request_builder import ServicePrincipalItemRequestBuilder

        url_tpl_params = get_path_parameters(self.path_parameters)
        url_tpl_params["servicePrincipal%2Did"] = service_principal_id
        return ServicePrincipalItemRequestBuilder(self.request_adapter, url_tpl_params)

        Provides operations to manage the collection of servicePrincipal entities.
        param service_principal_id: The unique identifier of servicePrincipal
        Returns: ServicePrincipalItemRequestBuilder
        
msgraph/generated/service_principals/service_principals_request_builder.py